3 [% IF ( displayprev || displaynext ) %]
4 <ul class="pagination">
5 [% IF ( displayprev ) %]
6 <li><a class="nav" href="label-item-search.pl?startfrom=[% startfromprev %]&ccl_query=[% ccl_query %]&resultsperpage=[% resultsperpage %]&op=do_search&batch_id=[% batch_id %]"><i class="fa fa-arrow-left"></i> Previous</a></li>
8 [% FOREACH number IN numbers %]
9 [% IF ( startfrom == number.startfrom ) %]
10 <li class="active"><span>[% number.number %]</span></a></li>
12 <li><a class="nav" href="label-item-search.pl?startfrom=[% number.startfrom %]&ccl_query=[% ccl_query %]&resultsperpage=[% resultsperpage %]&op=do_search&batch_id=[% batch_id %]">[% number.number %]</a></li>
15 [% IF ( displaynext ) %]
16 <li><a class="nav" href="label-item-search.pl?startfrom=[% startfromnext %]&ccl_query=[% ccl_query %]&resultsperpage=[% resultsperpage %]&op=do_search&batch_id=[% batch_id %]">Next <i class="fa fa-arrow-right"></i></a></li>
23 [% SET footerjs = 1 %]
24 [% INCLUDE 'doc-head-open.inc' %]
25 <title>Koha › Barcodes and labels › Search results</title>
26 [% INCLUDE 'doc-head-close.inc' %]
29 <body id="labels_result" class="tools labels">
30 <div class="main container-fluid">
31 <h1>Search results</h1>
33 [% PROCESS pagination %]
35 <strong>Results [% from %] through [% to %] [% IF ( total ) %] of [% total %][% END %]</strong>
40 <form name="resultform" action="">
41 <div id="toolbar" class="btn-toolbar">
42 <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>
43 <div class="btn-group"><a href="#" class="btn btn-default btn-sm close"><i class="fa fa-times-circle"></i> Done</a></div>
45 <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>
47 <div id="label-search-results">
48 <input type="hidden" name="ccl_query" value="[% ccl_query %]" />
49 [% FOREACH result_se IN result_set %]
50 <div style="border-bottom:1px solid #CCC;padding:1em 0;">
51 <h4>[% result_se.title |html %]</h4>
52 <p>[% IF ( result_se.author ) %]by [% result_se.author %][% END %]
53 [[% 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>
56 [% FOREACH item_tabl IN result_se.item_table %]
57 [% IF ( item_tabl.header_fields ) %]
60 [% FOREACH header_field IN item_tabl.header_fields %]
61 [% SWITCH header_field.field_label -%]
62 [% CASE "Add Item" -%]
64 [% CASE "Call Number" -%]
66 [% CASE "Accession Date" %]
67 <th>Accession date</th>
73 <th>[% header_field.field_label %]</th>
80 [% FOREACH text_field IN item_tabl.text_fields %]
81 [% IF ( text_field.select_field ) %]
82 <td><input type="checkbox" name="action" value="[% text_field.field_value %]"></td>
83 [% ELSIF ( text_field.link_field ) %]
85 <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>
88 <td>[% text_field.field_value %]</td>
100 [% PROCESS pagination %]
101 <div id="closewindow"><a href="#" class="btn btn-default btn-default close">Close</a></div>
104 [% MACRO jsinclude BLOCK %]
105 [% Asset.js("lib/jquery/plugins/jquery.fixFloat.js") %]
107 $(document).ready(function(){
108 $("#toolbar").fixFloat();
109 $("#CheckAll").click(function(e){
111 $("input[type='checkbox']").prop("checked",true);
113 $("#CheckNone").click(function(e){
115 $("input[type='checkbox']").prop("checked",false);
117 $("#add_items").on("click",function(){
118 add_item('checked',[% batch_id %],'[% type %]');
120 $(".select_item").on("click",function(e){
122 var batch_id = $(this).data("batch-id");
123 var itemnumber = $(this).data("item-number");
124 var type = $(this).data("field-type");
125 add_item(itemnumber, batch_id, type);
128 function add_item(item_number,batch_id,type_id){
129 var p = window.opener;
130 if (item_number == 'checked') {
132 if(document.resultform.action.length > 0) {
133 for (var i=0; i < document.resultform.action.length; i++) {
134 if (document.resultform.action[i].checked) {
135 p.add_item(document.resultform.action[i].value);
139 p.add_item(document.resultform.action.value);
143 p.add_item(item_number);
149 [% INCLUDE 'intranet-bottom.inc' popup_window=1 %]