2 [% INCLUDE 'doc-head-open.inc' %]
3 <title>Koha › Barcodes and labels › Search results</title>
4 [% INCLUDE 'doc-head-close.inc' %]
5 <style type="text/css">#custom-doc { width:46.23em;*width:45.04em;min-width:700px; margin:auto;margin-top: .4em; text-align:left; }</style>
6 [% Asset.js("lib/jquery/plugins/jquery.fixFloat.js") %]
7 <script type="text/javascript">
9 $(document).ready(function(){
10 $("#toolbar").fixFloat();
11 $("#CheckAll").click(function(e){
13 $("input[type='checkbox']").prop("checked",true);
15 $("#CheckNone").click(function(e){
17 $("input[type='checkbox']").prop("checked",false);
19 $("#add_items").on("click",function(){
20 add_item('checked',[% batch_id %],'[% type %]');
22 $(".select_item").on("click",function(e){
24 var batch_id = $(this).data("batch-id");
25 var itemnumber = $(this).data("item-number");
26 var type = $(this).data("field-type");
27 add_item(itemnumber, batch_id, type);
30 function add_item(item_number,batch_id,type_id){
31 var p = window.opener;
32 if (item_number == 'checked') {
34 if(document.resultform.action.length > 0) {
35 for (var i=0; i < document.resultform.action.length; i++) {
36 if (document.resultform.action[i].checked) {
37 p.add_item(document.resultform.action[i].value);
41 p.add_item(document.resultform.action.value);
45 p.add_item(item_number);
51 <body id="labels_result" class="tools labels">
52 <div id="custom-doc" class="yui-t7">
54 <h1>Search results</h1>
56 [% IF ( displayprev || displaynext ) %]
58 [% IF ( displayprev ) %]
59 <a href="label-item-search.pl?startfrom=[% startfromprev %]&ccl_query=[% ccl_query %]&resultsperpage=[% resultsperpage %]&op=do_search&batch_id=[% batch_id %]"><<</a>
61 [% FOREACH number IN numbers %]
62 <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>
64 [% IF ( displaynext ) %]
65 <a href="label-item-search.pl?startfrom=[% startfromnext %]&ccl_query=[% ccl_query %]&resultsperpage=[% resultsperpage %]&op=do_search&batch_id=[% batch_id %]">>></a>
70 <strong>Results [% from %] through [% to %] [% IF ( total ) %] of [% total %][% END %]</strong>
75 <form name="resultform" action="">
76 <div id="toolbar" class="btn-toolbar">
77 <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>
78 <div class="btn-group"><a href="#" class="btn btn-default btn-sm close"><i class="fa fa-times-circle"></i> Done</a></div>
80 <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>
82 <div id="label-search-results">
83 <input type="hidden" name="ccl_query" value="[% ccl_query %]" />
84 [% FOREACH result_se IN result_set %]
85 <div style="border-bottom:1px solid #CCC;padding:1em 0;">
86 <h4>[% result_se.title |html %]</h4>
87 <p>[% IF ( result_se.author ) %]by [% result_se.author %][% END %]
88 [[% 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>
91 [% FOREACH item_tabl IN result_se.item_table %]
92 [% IF ( item_tabl.header_fields ) %]
95 [% FOREACH header_field IN item_tabl.header_fields %]
96 [% SWITCH header_field.field_label -%]
97 [% CASE "Add Item" -%]
99 [% CASE "Call Number" -%]
101 [% CASE "Accession Date" %]
102 <th>Accession date</th>
108 <th>[% header_field.field_label %]</th>
115 [% FOREACH text_field IN item_tabl.text_fields %]
116 [% IF ( text_field.select_field ) %]
117 <td><input type="checkbox" name="action" value="[% text_field.field_value %]"></td>
118 [% ELSIF ( text_field.link_field ) %]
120 <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>
123 <td>[% text_field.field_value %]</td>
135 [% IF ( displayprev || displaynext ) %]
137 [% IF ( displayprev ) %]
138 <a href="label-item-search.pl?startfrom=[% startfromnext %]&ccl_query=[% ccl_query %]&resultsperpage=[% resultsperpage %]&op=do_search&batch_id=[% batch_id %]"><<</a>
140 [% FOREACH number IN numbers %]
141 [% IF ( number.highlight ) %]
142 <span class="current">[% number.number %]</span>
144 <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>
147 [% IF ( displaynext ) %]
148 <a href="label-item-search.pl?startfrom=[% startfromnext %]&ccl_query=[% ccl_query %]&resultsperpage=[% resultsperpage %]&op=do_search&batch_id=[% batch_id %]">>></a>
151 <div id="closewindow"><a href="#" class="btn btn-default btn-default close">Close</a></div>
154 [% INCLUDE 'popup-bottom.inc' %]