Filename | /home/vagrant/kohaclone/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search-box.inc |
Statements | Executed 18 statements in 177µs |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
1 | 1 | 1 | 38µs | 125µs | __ANON__[:62] | Template::Document::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | # spent 125µs (38+87) within Template::Document::__ANON__[/home/vagrant/kohaclone/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search-box.inc:62] which was called:
# once (38µs+87µs) by Template::Document::process at line 163 of Template/Document.pm | ||||
2 | 2 | 8µs | 2 | 34µs | $stash->set('Branches', # spent 31µs making 1 call to Template::Context::plugin
# spent 3µs making 1 call to Template::Stash::XS::set |
3 | $context->plugin('Branches')); | ||||
4 | 1 | 700ns | $output .= "\n"; | ||
5 | #line 50 "/home/vagrant/kohaclone/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search-box.inc" | ||||
6 | if (($stash->get('CAN_user_circulate'))) { | ||||
7 | 1 | 300ns | #line 23 "/home/vagrant/kohaclone/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search-box.inc" | ||
8 | if (($stash->get('CircAutocompl'))) { | ||||
9 | $output .= "<script type=\"text/javascript\">\n//<![CDATA[\n\$(document).ready(function(){\n \$( \"#findborrower\" ).autocomplete({\n source: \"/cgi-bin/koha/circ/ysearch.pl\",\n minLength: 3,\n select: function( event, ui ) {\n \$( \"#findborrower\" ).val( ui.item.cardnumber );\n \$(\"#patronsearch\").submit();\n return false;\n }\n })\n .data( \"ui-autocomplete\" )._renderItem = function( ul, item ) {\n return \$( \"<li></li>\" )\n .data( \"ui-autocomplete-item\", item )\n .append( \"<a>\" + item.surname + \", \" + item.firstname + \" (\" + item.cardnumber + \") <small>\" + item.dateofbirth + \" \" + item.address + \" \" + item.city + \" \" + item.zipcode + \" \" + item.country + \"</small></a>\" )\n .appendTo( ul );\n };\n\n});\n//]]>\n</script>"; | ||||
10 | } | ||||
11 | |||||
12 | $output .= "\n <div id=\"circ_search\" class=\"residentsearch\">\n <p class=\"tip\">Enter patron card number or partial name:</p>\n <form action=\"/cgi-bin/koha/circ/circulation.pl\" id=\"patronsearch\" method=\"post\">\n "; | ||||
13 | #line 47 "/home/vagrant/kohaclone/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search-box.inc" | ||||
14 | if (($stash->get('CircAutocompl'))) { | ||||
15 | $output .= "\n <div class=\"autocomplete\">\n <input autocomplete=\"off\" id=\"findborrower\" name=\"findborrower\" size=\"40\" class=\"head-searchbox focus\" type=\"text\" />\n <input id=\"autocsubmit\" type=\"submit\" class=\"submit\" value=\"Submit\" />\n <input name=\"branch\" value=\""; | ||||
16 | #line 31 "/home/vagrant/kohaclone/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search-box.inc" | ||||
17 | $output .= $stash->get(['Branches', 0, 'GetLoggedInBranchcode', 0]); | ||||
18 | $output .= "\" type=\"hidden\" />\n <input name=\"printer\" value=\"\" type=\"hidden\" />\n "; | ||||
19 | #line 36 "/home/vagrant/kohaclone/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search-box.inc" | ||||
20 | if (($stash->get('stickyduedate'))) { | ||||
21 | $output .= "\n <input type=\"hidden\" name=\"duedatespec\" value=\""; | ||||
22 | #line 34 "/home/vagrant/kohaclone/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search-box.inc" | ||||
23 | 1 | 5µs | 1 | 2µs | $output .= $stash->get('duedatespec'); # spent 2µs making 1 call to Template::Stash::XS::get |
24 | $output .= "\" />\n <input type=\"hidden\" name=\"stickyduedate\" value=\""; | ||||
25 | #line 35 "/home/vagrant/kohaclone/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search-box.inc" | ||||
26 | $output .= $stash->get('stickyduedate'); | ||||
27 | 1 | 300ns | $output .= "\" />\n "; | ||
28 | } | ||||
29 | |||||
30 | $output .= "\n </div>\n "; | ||||
31 | 1 | 16µs | 2 | 55µs | } # spent 34µs making 1 call to Template::Stash::XS::get
# spent 21µs making 1 call to Koha::Template::Plugin::Branches::GetLoggedInBranchcode |
32 | 1 | 1µs | else { | ||
33 | $output .= "\n <input id=\"findborrower\" name=\"findborrower\" size=\"40\" class=\"head-searchbox focus\" type=\"text\" />\n <input name=\"branch\" value=\""; | ||||
34 | #line 40 "/home/vagrant/kohaclone/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search-box.inc" | ||||
35 | $output .= $stash->get('branch'); | ||||
36 | 1 | 9µs | 2 | 15µs | $output .= "\" type=\"hidden\" />\n <input name=\"printer\" value=\"\" type=\"hidden\" />\n "; # spent 11µs making 1 call to Template::Stash::XS::get
# spent 4µs making 1 call to Template::Stash::undefined |
37 | #line 45 "/home/vagrant/kohaclone/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search-box.inc" | ||||
38 | if (($stash->get('stickyduedate'))) { | ||||
39 | 1 | 600ns | $output .= "\n <input type=\"hidden\" name=\"duedatespec\" value=\""; | ||
40 | #line 43 "/home/vagrant/kohaclone/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search-box.inc" | ||||
41 | $output .= $stash->get('duedatespec'); | ||||
42 | $output .= "\" />\n <input type=\"hidden\" name=\"stickyduedate\" value=\""; | ||||
43 | #line 44 "/home/vagrant/kohaclone/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search-box.inc" | ||||
44 | $output .= $stash->get('stickyduedate'); | ||||
45 | $output .= "\" />\n "; | ||||
46 | } | ||||
47 | 1 | 5µs | 1 | 2µs | # spent 2µs making 1 call to Template::Stash::XS::get |
48 | 1 | 300ns | $output .= "\n <input value=\"Submit\" class=\"submit\" type=\"submit\" />\n "; | ||
49 | } | ||||
50 | 1 | 6µs | 1 | 2µs | # spent 2µs making 1 call to Template::Stash::XS::get |
51 | 1 | 400ns | $output .= "\n </form>\n </div>\n "; | ||
52 | } | ||||
53 | |||||
54 | 1 | 400ns | $output .= "\n"; | ||
55 | } }; | ||||
56 | 1 | 100ns | if ($@) { | ||
57 | $_tt_error = $context->catch($@, \$output); | ||||
58 | die $_tt_error unless $_tt_error->type eq 'return'; | ||||
59 | } | ||||
60 | |||||
61 | 1 | 5µs | return $output; | ||
62 | } | ||||
63 | 1 | 118µs |