4 [% IF ( displayprev || displaynext ) %]
5 <ul class="pagination">
6 [% IF ( displayprev ) %]
7 <li><a class="nav" href="label-item-search.pl?startfrom=[% startfromprev | html %]&ccl_query=[% ccl_query | html %]&resultsperpage=[% resultsperpage | html %]&op=do_search&batch_id=[% batch_id | html %]"><i class="fa fa-arrow-left"></i> Previous</a></li>
9 [% FOREACH number IN numbers %]
10 [% IF ( startfrom == number.startfrom ) %]
11 <li class="active"><span>[% number.number | html %]</span></a></li>
13 <li><a class="nav" href="label-item-search.pl?startfrom=[% number.startfrom | html %]&ccl_query=[% ccl_query | html %]&resultsperpage=[% resultsperpage | html %]&op=do_search&batch_id=[% batch_id | html %]">[% number.number | html %]</a></li>
16 [% IF ( displaynext ) %]
17 <li><a class="nav" href="label-item-search.pl?startfrom=[% startfromnext | html %]&ccl_query=[% ccl_query | html %]&resultsperpage=[% resultsperpage | html %]&op=do_search&batch_id=[% batch_id | html %]">Next <i class="fa fa-arrow-right"></i></a></li>
24 [% SET footerjs = 1 %]
25 [% INCLUDE 'doc-head-open.inc' %]
26 <title>Koha › Barcodes and labels › Search results</title>
27 [% INCLUDE 'doc-head-close.inc' %]
30 <body id="labels_result" class="tools labels">
31 <div class="main container-fluid">
32 <h1>Search results</h1>
34 [% PROCESS pagination %]
36 <strong>Results [% from | html %] through [% to | html %] [% IF ( total ) %] of [% total | html %][% END %]</strong>
41 <form name="resultform" action="" style="display:block">
42 <div id="toolbar" class="btn-toolbar">
43 <div class="btn-group"><button type="button" class="btn btn-default" id="add_items"><i class="fa fa-plus"></i> Add checked</button></div>
44 <div class="btn-group"><a href="#" class="btn btn-default close"><i class="fa fa-times-circle"></i> Done</a></div>
46 <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>
48 <div id="label-search-results">
49 <input type="hidden" name="ccl_query" value="[% ccl_query | html %]" />
50 [% FOREACH result_se IN result_set %]
51 <div style="border-bottom:1px solid #CCC;padding:1em 0;">
52 <h4>[% result_se.title | html %]</h4>
53 <p>[% IF ( result_se.author ) %]by [% result_se.author | html %][% END %]
54 [[% result_se.itemtype | html %]], [% IF ( result_se.publishercode ) %][% result_se.publishercode | html %] [% END %][% IF ( result_se.place ) %][% result_se.place | html %] [% END %][% IF ( result_se.copyrightdate ) %][% result_se.copyrightdate | html %], [% END %][% IF ( result_se.pages ) %][% result_se.pages | html %][% END %][% IF ( result_se.isbn ) %], <b>ISBN: </b>[% result_se.isbn | html %][% END %][% IF ( result_se.notes ) %],<br />[% result_se.notes | html %][% END %]</p>
57 [% FOREACH item_tabl IN result_se.item_table %]
58 [% IF ( item_tabl.header_fields ) %]
61 [% FOREACH header_field IN item_tabl.header_fields %]
62 [% SWITCH header_field.field_label -%]
63 [% CASE "Add Item" -%]
65 [% CASE "Call Number" -%]
67 [% CASE "Accession Date" %]
68 <th>Accession date</th>
74 <th>[% header_field.field_label | html %]</th>
81 [% FOREACH text_field IN item_tabl.text_fields %]
82 [% IF ( text_field.select_field ) %]
83 <td><input type="checkbox" name="action" value="[% text_field.field_value | html %]"></td>
84 [% ELSIF ( text_field.link_field ) %]
86 <a class="btn btn-default btn-xs select_item" data-item-number="[% text_field.field_value | html %]" data-batch-id="[% batch_id | html %]" data-field-type="[% text_field.type | html %]"><i class="fa fa-plus"></i> Add</a>
89 <td>[% text_field.field_value | html %]</td>
101 [% PROCESS pagination %]
102 <div id="closewindow"><a href="#" class="btn btn-default btn-default close">Close</a></div>
105 [% MACRO jsinclude BLOCK %]
106 [% Asset.js("lib/hc-sticky.js") | $raw %]
109 $(document).ready(function(){
110 Sticky = $("#toolbar");
113 stickyClass: "floating"
115 $("#CheckAll").click(function(e){
117 $("input[type='checkbox']").prop("checked",true);
119 $("#CheckNone").click(function(e){
121 $("input[type='checkbox']").prop("checked",false);
123 $("#add_items").on("click",function(){
124 add_item('checked',[% batch_id | html %],'[% type | html %]');
126 $(".select_item").on("click",function(e){
128 var batch_id = $(this).data("batch-id");
129 var itemnumber = $(this).data("item-number");
130 var type = $(this).data("field-type");
131 add_item(itemnumber, batch_id, type);
134 function add_item(item_number,batch_id,type_id){
135 var p = window.opener;
136 if (item_number == 'checked') {
138 if(document.resultform.action.length > 0) {
139 for (var i=0; i < document.resultform.action.length; i++) {
140 if (document.resultform.action[i].checked) {
141 p.add_item(document.resultform.action[i].value);
145 p.add_item(document.resultform.action.value);
149 p.add_item(item_number);
155 [% INCLUDE 'intranet-bottom.inc' popup_window=1 %]