1 [% INCLUDE 'doc-head-open.inc' %]
2 <title>Koha › Barcodes and Labels › Search Results</title>
3 [% INCLUDE 'doc-head-close.inc' %]
4 <style type="text/css">#custom-doc { width:46.23em;*width:45.04em;min-width:700px; margin:auto;margin-top: .4em; text-align:left; }</style>
5 <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
6 <script type="text/javascript">
8 $(document).ready(function(){
9 $("#CheckAll").click(function(){
10 $(".checkboxed").checkCheckboxes();
13 $("#CheckNone").click(function(){
14 $(".checkboxed").unCheckCheckboxes();
18 function add_item(item_number,batch_id,type_id){
20 if (item_number == 'checked') {
22 if(document.resultform.action.length > 0) {
23 for (var i=0; i < document.resultform.action.length; i++) {
24 if (document.resultform.action[i].checked) {
25 items.push("item_number=" + document.resultform.action[i].value);
28 getstr = items.join("&");
30 getstr = "item_number="+document.resultform.action.value;
34 getstr = "item_number="+item_number;
36 var myurl = "label-edit-batch.pl?op=add&batch_id="+batch_id+
38 window.opener.location.href = myurl;
39 //top.location.href=myurl;
45 <div id="custom-doc" class="yui-t7">
47 <h1>Search results</h1>
49 [% IF ( displayprev || displaynext ) %]
51 [% IF ( displayprev ) %]
52 <a href="label-item-search.pl?startfrom=[% startfromprev %]&ccl_query=[% ccl_query %]&resultsperpage=[% resultsperpage %]&op=do_search&batch_id=[% batch_id %]"><<</a>
54 [% FOREACH number IN numbers %]
55 <a href="label-item-search.pl?startfrom=[% number.startfrom %]&ccl_query=[% ccl_query %]&resultsperpage=[% resultsperpage %]&op=do_search&batch_id=[% batch_id %]">[% number.number %]</a>
57 [% IF ( displaynext ) %]
58 <a href="label-item-search.pl?startfrom=[% startfromnext %]&ccl_query=[% ccl_query %]&resultsperpage=[% resultsperpage %]&op=do_search&batch_id=[% batch_id %]">>></a>
63 <strong>Results [% from %] through [% to %] [% IF ( total ) %] of [% total %][% END %]</strong>
69 <form name="resultform" class="checkboxed" action="">
70 <p><a id="CheckAll" href="#">Select All</a> <a id="CheckNone" href="#">Clear All</a> | <input type="button" value="Add checked" onclick="add_item('checked',[% batch_id %],'[% type %]'); return false;" />
71 <input type="button" class="close" value="Done" /></p>
73 <div id="label-search-results">
74 <input type="hidden" name="ccl_query" value="[% ccl_query %]" />
75 [% FOREACH result_se IN result_set %]
76 <div style="border-bottom:1px solid #CCC;margin: .5em 0;">
77 <h4>[% result_se.title |html %]</h4>
78 <p>[% IF ( result_se.author ) %]by [% result_se.author %][% END %]
79 [[% result_se.itemtype %]], [% IF ( result_se.publishercode ) %][% result_se.publishercode %] [% END %][% IF ( result_se.place ) %][% result_se.place %] [% END %][% IF ( result_se.copyrightdate ) %][% result_se.copyrightdate %], [% END %][% IF ( result_se.pages ) %][% result_se.pages %][% END %][% IF ( result_se.isbn ) %], <b>ISBN: </b>[% result_se.isbn %][% END %][% IF ( result_se.notes ) %],<br />[% result_se.notes %][% END %]</p>
81 <table style="margin-bottom:1em;">
82 [% FOREACH item_tabl IN result_se.item_table %]
83 [% IF ( item_tabl.header_fields ) %]
85 [% FOREACH header_field IN item_tabl.header_fields %]
86 <th>[% header_field.field_label %]</th>
91 [% FOREACH text_field IN item_tabl.text_fields %]
92 [% IF ( text_field.select_field ) %]
93 <td align="center"><input type="checkbox" name="action" value="[% text_field.field_value %]"></td>
94 [% ELSIF ( text_field.link_field ) %]
96 <a onclick="add_item('[% text_field.field_value %]',[% batch_id %], '[% text_field.type %]'); return false" href="/cgi-bin/koha/barcodes/label-edit-batch.pl?op=add&batch_id=[% batch_id %]&item_number=[% text_field.field_value %]">Add</a>
99 <td align="center">[% text_field.field_value %]</td>
111 <div class="results">
112 [% IF ( displayprev || displaynext ) %]
114 [% IF ( displayprev ) %]
115 <a href="label-item-search.pl?startfrom=[% startfromnext %]&ccl_query=[% ccl_query %]&resultsperpage=[% resultsperpage %]&op=do_search&batch_id=[% batch_id %]"><<</a>
117 [% FOREACH number IN numbers %]
118 [% IF ( number.highlight ) %]
119 <span class="current">[% number.number %]</span>
121 <a href="label-item-search.pl?startfrom=[% number.startfrom %]&ccl_query=[% number.ccl_query %]&resultsperpage=[% number.resultsperpage %]&op=do_search&batch_id=[% number.batch_id %]">[% number.number %]</a>
124 [% IF ( displaynext ) %]
125 <a href="label-item-search.pl?startfrom=[% startfromnext %]&ccl_query=[% ccl_query %]&resultsperpage=[% resultsperpage %]&op=do_search&batch_id=[% batch_id %]">>></a>
130 [% INCLUDE 'popup-bottom.inc' %]