3 [% INCLUDE 'doc-head-open.inc' %]
4 <title>Koha › Barcodes and labels › Search results</title>
5 [% INCLUDE 'doc-head-close.inc' %]
8 <body id="labels_result" class="tools labels">
9 <div class="main container-fluid">
10 <h1>Search results</h1>
12 [% IF ( displayprev || displaynext ) %]
14 [% IF ( displayprev ) %]
15 <a href="label-item-search.pl?startfrom=[% startfromprev %]&ccl_query=[% ccl_query %]&resultsperpage=[% resultsperpage %]&op=do_search&batch_id=[% batch_id %]"><<</a>
17 [% FOREACH number IN numbers %]
18 <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>
20 [% IF ( displaynext ) %]
21 <a href="label-item-search.pl?startfrom=[% startfromnext %]&ccl_query=[% ccl_query %]&resultsperpage=[% resultsperpage %]&op=do_search&batch_id=[% batch_id %]">>></a>
26 <strong>Results [% from %] through [% to %] [% IF ( total ) %] of [% total %][% END %]</strong>
31 <form name="resultform" action="">
32 <div id="toolbar" class="btn-toolbar">
33 <div class="btn-group"><button type="button" class="btn btn-default btn-sm" id="add_items"><i class="fa fa-plus"></i> Add checked</button></div>
34 <div class="btn-group"><a href="#" class="btn btn-default btn-sm close"><i class="fa fa-times-circle"></i> Done</a></div>
36 <div><a id="CheckAll" href="#"><i class="fa fa-check"></i> Select all</a> <a id="CheckNone" href="#"><i class="fa fa-remove"></i> Clear all</a></div>
38 <div id="label-search-results">
39 <input type="hidden" name="ccl_query" value="[% ccl_query %]" />
40 [% FOREACH result_se IN result_set %]
41 <div style="border-bottom:1px solid #CCC;padding:1em 0;">
42 <h4>[% result_se.title |html %]</h4>
43 <p>[% IF ( result_se.author ) %]by [% result_se.author %][% END %]
44 [[% 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>
47 [% FOREACH item_tabl IN result_se.item_table %]
48 [% IF ( item_tabl.header_fields ) %]
51 [% FOREACH header_field IN item_tabl.header_fields %]
52 [% SWITCH header_field.field_label -%]
53 [% CASE "Add Item" -%]
55 [% CASE "Call Number" -%]
57 [% CASE "Accession Date" %]
58 <th>Accession date</th>
64 <th>[% header_field.field_label %]</th>
71 [% FOREACH text_field IN item_tabl.text_fields %]
72 [% IF ( text_field.select_field ) %]
73 <td><input type="checkbox" name="action" value="[% text_field.field_value %]"></td>
74 [% ELSIF ( text_field.link_field ) %]
76 <a class="btn btn-default btn-xs select_item" data-item-number="[% text_field.field_value %]" data-batch-id="[% batch_id %]" data-field-type="[% text_field.type %]"><i class="fa fa-plus"></i> Add</a>
79 <td>[% text_field.field_value %]</td>
91 [% IF ( displayprev || displaynext ) %]
93 [% IF ( displayprev ) %]
94 <a href="label-item-search.pl?startfrom=[% startfromnext %]&ccl_query=[% ccl_query %]&resultsperpage=[% resultsperpage %]&op=do_search&batch_id=[% batch_id %]"><<</a>
96 [% FOREACH number IN numbers %]
97 [% IF ( number.highlight ) %]
98 <span class="current">[% number.number %]</span>
100 <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>
103 [% IF ( displaynext ) %]
104 <a href="label-item-search.pl?startfrom=[% startfromnext %]&ccl_query=[% ccl_query %]&resultsperpage=[% resultsperpage %]&op=do_search&batch_id=[% batch_id %]">>></a>
107 <div id="closewindow"><a href="#" class="btn btn-default btn-default close">Close</a></div>
111 [% MACRO jsinclude BLOCK %]
112 [% Asset.js("lib/jquery/plugins/jquery.fixFloat.js") %]
114 $(document).ready(function(){
115 $("#toolbar").fixFloat();
116 $("#CheckAll").click(function(e){
118 $("input[type='checkbox']").prop("checked",true);
120 $("#CheckNone").click(function(e){
122 $("input[type='checkbox']").prop("checked",false);
124 $("#add_items").on("click",function(){
125 add_item('checked',[% batch_id %],'[% type %]');
127 $(".select_item").on("click",function(e){
129 var batch_id = $(this).data("batch-id");
130 var itemnumber = $(this).data("item-number");
131 var type = $(this).data("field-type");
132 add_item(itemnumber, batch_id, type);
135 function add_item(item_number,batch_id,type_id){
136 var p = window.opener;
137 if (item_number == 'checked') {
139 if(document.resultform.action.length > 0) {
140 for (var i=0; i < document.resultform.action.length; i++) {
141 if (document.resultform.action[i].checked) {
142 p.add_item(document.resultform.action[i].value);
146 p.add_item(document.resultform.action.value);
150 p.add_item(item_number);
156 [% INCLUDE 'intranet-bottom.inc' popup_window=1 %]