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>Search results › Barcodes and labels › Koha</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 <h3>Results [% from | html %] through [% to | html %] [% IF ( total ) %] of [% total | html %][% END %]</h3>
36 <h3>No results found</h3>
39 [% PROCESS pagination %]
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>
47 <div id="selection_ops">
48 <a id="CheckAll" class="btn btn-link" href="#"><i class="fa fa-check"></i> Select all</a>
49 <a id="CheckNone" class="btn btn-link" href="#"><i class="fa fa-remove"></i> Clear all</a>
52 <div id="label-search-results" class="page-section">
53 <input type="hidden" name="ccl_query" value="[% ccl_query | html %]" />
54 [% FOREACH result_se IN result_set %]
55 <div style="border-bottom:1px solid #CCC;padding:1em 0;">
56 <h4>[% result_se.title | html %]</h4>
57 <p>[% IF ( result_se.author ) %]by [% result_se.author | html %][% END %]
58 [[% 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 ) %], <strong>ISBN: </strong>[% result_se.isbn | html %][% END %][% IF ( result_se.notes ) %],<br />[% result_se.notes | html %][% END %]</p>
61 [% FOREACH item_tabl IN result_se.item_table %]
62 [% IF ( item_tabl.header_fields ) %]
65 [% FOREACH header_field IN item_tabl.header_fields %]
66 [% SWITCH header_field.field_label -%]
67 [% CASE "Add Item" -%]
69 [% CASE "Call Number" -%]
71 [% CASE "Accession Date" %]
72 <th>Accession date</th>
78 <th>[% header_field.field_label | html %]</th>
85 [% FOREACH text_field IN item_tabl.text_fields %]
86 [% IF ( text_field.select_field ) %]
87 <td><input type="checkbox" name="action" value="[% text_field.field_value | html %]"></td>
88 [% ELSIF ( text_field.link_field ) %]
90 <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>
93 <td>[% text_field.field_value | html %]</td>
105 [% PROCESS pagination %]
106 <div id="closewindow"><a href="#" class="btn btn-default btn-default close">Close</a></div>
109 [% MACRO jsinclude BLOCK %]
110 [% Asset.js("lib/hc-sticky.js") | $raw %]
113 $(document).ready(function(){
114 Sticky = $("#toolbar");
117 stickyClass: "floating"
119 $("#CheckAll").click(function(e){
121 $("input[type='checkbox']").prop("checked",true);
123 $("#CheckNone").click(function(e){
125 $("input[type='checkbox']").prop("checked",false);
127 $("#add_items").on("click",function(){
128 add_item('checked',[% batch_id | html %],'[% type | html %]');
130 $(".select_item").on("click",function(e){
132 var batch_id = $(this).data("batch-id");
133 var itemnumber = $(this).data("item-number");
134 var type = $(this).data("field-type");
135 add_item(itemnumber, batch_id, type);
138 function add_item(item_number,batch_id,type_id){
139 var p = window.opener;
140 if (item_number == 'checked') {
142 if(document.resultform.action.length > 0) {
143 for (var i=0; i < document.resultform.action.length; i++) {
144 if (document.resultform.action[i].checked) {
145 p.add_item(document.resultform.action[i].value);
149 p.add_item(document.resultform.action.value);
153 p.add_item(item_number);
159 [% INCLUDE 'intranet-bottom.inc' popup_window=1 %]