Filename | /home/vagrant/kohaclone/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search-box.inc |
Statements | Executed 18 statements in 65µs |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
4 | 1 | 1 | 147µs | 510µs | __ANON__[:62] | Template::Document::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | # spent 510µs (147+363) within Template::Document::__ANON__[/home/vagrant/kohaclone/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search-box.inc:62] which was called 4 times, avg 128µs/call:
# 4 times (147µs+363µs) by Template::Document::process at line 163 of Template/Document.pm, avg 128µs/call | ||||
2 | 2 | 8µs | 8 | 145µs | $stash->set('Branches', # spent 130µs making 4 calls to Template::Context::plugin, avg 32µs/call
# spent 15µs making 4 calls to Template::Stash::XS::set, avg 4µs/call |
3 | $context->plugin('Branches')); | ||||
4 | 1 | 1µs | $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 | 400ns | #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 | 4 | 9µs | $output .= $stash->get('duedatespec'); # spent 9µs making 4 calls to Template::Stash::XS::get, avg 2µs/call |
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 | 400ns | $output .= "\" />\n "; | ||
28 | } | ||||
29 | |||||
30 | $output .= "\n </div>\n "; | ||||
31 | 1 | 18µs | 8 | 224µs | } # spent 139µs making 4 calls to Template::Stash::XS::get, avg 35µs/call
# spent 85µs making 4 calls to Koha::Template::Plugin::Branches::GetLoggedInBranchcode, avg 21µs/call |
32 | 1 | 2µ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 | 8µs | 8 | 57µs | $output .= "\" type=\"hidden\" />\n <input name=\"printer\" value=\"\" type=\"hidden\" />\n "; # spent 42µs making 4 calls to Template::Stash::XS::get, avg 11µs/call
# spent 15µs making 4 calls to Template::Stash::undefined, avg 4µs/call |
37 | #line 45 "/home/vagrant/kohaclone/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search-box.inc" | ||||
38 | if (($stash->get('stickyduedate'))) { | ||||
39 | 1 | 800ns | $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 | 4 | 9µs | # spent 9µs making 4 calls to Template::Stash::XS::get, avg 2µs/call |
48 | 1 | 400ns | $output .= "\n <input value=\"Submit\" class=\"submit\" type=\"submit\" />\n "; | ||
49 | } | ||||
50 | 1 | 5µs | 4 | 10µs | # spent 10µs making 4 calls to Template::Stash::XS::get, avg 3µs/call |
51 | 1 | 500ns | $output .= "\n </form>\n </div>\n "; | ||
52 | } | ||||
53 | |||||
54 | 1 | 400ns | $output .= "\n"; | ||
55 | } }; | ||||
56 | 1 | 200ns | if ($@) { | ||
57 | $_tt_error = $context->catch($@, \$output); | ||||
58 | die $_tt_error unless $_tt_error->type eq 'return'; | ||||
59 | } | ||||
60 | |||||
61 | 1 | 3µs | return $output; | ||
62 | } | ||||
63 | 1 | 7µs |