2 [% PROCESS 'i18n.inc' %]
5 [% IF ( displayprev || displaynext ) %]
6 <ul class="pagination">
7 [% IF ( displayprev ) %]
8 <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>
10 [% FOREACH number IN numbers %]
11 [% IF ( startfrom == number.startfrom ) %]
12 <li class="active"><span>[% number.number | html %]</span></a></li>
14 <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>
17 [% IF ( displaynext ) %]
18 <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>
25 [% SET footerjs = 1 %]
26 [% INCLUDE 'doc-head-open.inc' %]
27 <title>[% FILTER collapse %]
28 [% t("Search results") | html %] ›
29 [% t("Labels") | html %] ›
30 [% t("Koha") | html %]
32 [% INCLUDE 'doc-head-close.inc' %]
35 <body id="labels_result" class="tools labels">
36 <div class="main container-fluid">
37 <h1>Search results</h1>
39 <h3>Results [% from | html %] through [% to | html %] [% IF ( total ) %] of [% total | html %][% END %]</h3>
41 <h3>No results found</h3>
44 [% PROCESS pagination %]
46 <form name="resultform" action="" style="display:block">
47 <div id="toolbar" class="btn-toolbar">
48 <div class="btn-group"><button type="button" class="btn btn-default" id="add_items"><i class="fa fa-plus"></i> Add checked</button></div>
49 <div class="btn-group"><a href="#" class="btn btn-default close"><i class="fa fa-times-circle"></i> Done</a></div>
51 <div id="selection_ops">
52 <a id="CheckAll" class="btn btn-link" href="#"><i class="fa fa-check"></i> Select all</a>
53 <a id="CheckNone" class="btn btn-link" href="#"><i class="fa fa-times"></i> Clear all</a>
56 <div id="label-search-results" class="page-section">
57 <input type="hidden" name="ccl_query" value="[% ccl_query | html %]" />
58 [% FOREACH result_se IN result_set %]
59 <div style="border-bottom:1px solid #CCC;padding:1em 0;">
60 <h4>[% result_se.title | html %]</h4>
61 <p>[% IF ( result_se.author ) %]by [% result_se.author | html %][% END %]
62 [[% 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>
65 [% FOREACH item_tabl IN result_se.item_table %]
66 [% IF ( item_tabl.header_fields ) %]
69 [% FOREACH header_field IN item_tabl.header_fields %]
70 [% SWITCH header_field.field_label -%]
71 [% CASE "Add Item" -%]
73 [% CASE "Call Number" -%]
75 [% CASE "Accession Date" %]
76 <th>Accession date</th>
82 <th>[% header_field.field_label | html %]</th>
89 [% FOREACH text_field IN item_tabl.text_fields %]
90 [% IF ( text_field.select_field ) %]
91 <td><input type="checkbox" name="action" value="[% text_field.field_value | html %]"></td>
92 [% ELSIF ( text_field.link_field ) %]
94 <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>
97 <td>[% text_field.field_value | html %]</td>
109 [% PROCESS pagination %]
110 <div id="closewindow"><a href="#" class="btn btn-default btn-default close">Close</a></div>
113 [% MACRO jsinclude BLOCK %]
114 [% Asset.js("lib/hc-sticky.js") | $raw %]
117 $(document).ready(function(){
118 Sticky = $("#toolbar");
121 stickyClass: "floating"
123 $("#CheckAll").click(function(e){
125 $("input[type='checkbox']").prop("checked",true);
127 $("#CheckNone").click(function(e){
129 $("input[type='checkbox']").prop("checked",false);
131 $("#add_items").on("click",function(){
132 add_item('checked',[% batch_id | html %],'[% type | html %]');
134 $(".select_item").on("click",function(e){
136 var batch_id = $(this).data("batch-id");
137 var itemnumber = $(this).data("item-number");
138 var type = $(this).data("field-type");
139 add_item(itemnumber, batch_id, type);
142 function add_item(item_number,batch_id,type_id){
143 var p = window.opener;
144 if (item_number == 'checked') {
146 if(document.resultform.action.length > 0) {
147 for (var i=0; i < document.resultform.action.length; i++) {
148 if (document.resultform.action[i].checked) {
149 p.add_item(document.resultform.action[i].value);
153 p.add_item(document.resultform.action.value);
157 p.add_item(item_number);
163 [% INCLUDE 'intranet-bottom.inc' popup_window=1 %]