1 [% INCLUDE 'doc-head-open.inc' %]
2 <title>Koha › Barcodes and labels › Search results</title>
3 [% INCLUDE 'doc-head-close.inc' %]
4 <style type="text/css">#custom-doc { width:46.23em;*width:45.04em;min-width:700px; margin:auto;margin-top: .4em; text-align:left; }</style>
5 <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.fixFloat.js"></script>
6 <script type="text/javascript">
8 $(document).ready(function(){
9 $("#toolbar").fixFloat();
10 $("#CheckAll").click(function(e){
12 $("input[type='checkbox']").prop("checked",true);
14 $("#CheckNone").click(function(e){
16 $("input[type='checkbox']").prop("checked",false);
18 $("#add_items").on("click",function(){
19 add_item('checked',[% batch_id %],'[% type %]');
21 $(".select_item").on("click",function(e){
23 var batch_id = $(this).data("batch-id");
24 var itemnumber = $(this).data("item-number");
25 var type = $(this).data("field-type");
26 add_item(itemnumber, batch_id, type);
29 function add_item(item_number,batch_id,type_id){
30 var p = window.opener;
31 if (item_number == 'checked') {
33 if(document.resultform.action.length > 0) {
34 for (var i=0; i < document.resultform.action.length; i++) {
35 if (document.resultform.action[i].checked) {
36 p.add_item(document.resultform.action[i].value);
40 p.add_item(document.resultform.action.value);
44 p.add_item(item_number);
50 <body id="labels_result" class="tools labels">
51 <div id="custom-doc" class="yui-t7">
53 <h1>Search results</h1>
55 [% IF ( displayprev || displaynext ) %]
57 [% IF ( displayprev ) %]
58 <a href="label-item-search.pl?startfrom=[% startfromprev %]&ccl_query=[% ccl_query %]&resultsperpage=[% resultsperpage %]&op=do_search&batch_id=[% batch_id %]"><<</a>
60 [% FOREACH number IN numbers %]
61 <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>
63 [% IF ( displaynext ) %]
64 <a href="label-item-search.pl?startfrom=[% startfromnext %]&ccl_query=[% ccl_query %]&resultsperpage=[% resultsperpage %]&op=do_search&batch_id=[% batch_id %]">>></a>
69 <strong>Results [% from %] through [% to %] [% IF ( total ) %] of [% total %][% END %]</strong>
74 <form name="resultform" action="">
75 <div id="toolbar" class="btn-toolbar">
76 <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>
77 <div class="btn-group"><a href="#" class="btn btn-default btn-sm close"><i class="fa fa-times-circle"></i> Done</a></div>
79 <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>
81 <div id="label-search-results">
82 <input type="hidden" name="ccl_query" value="[% ccl_query %]" />
83 [% FOREACH result_se IN result_set %]
84 <div style="border-bottom:1px solid #CCC;padding:1em 0;">
85 <h4>[% result_se.title |html %]</h4>
86 <p>[% IF ( result_se.author ) %]by [% result_se.author %][% END %]
87 [[% 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>
90 [% FOREACH item_tabl IN result_se.item_table %]
91 [% IF ( item_tabl.header_fields ) %]
94 [% FOREACH header_field IN item_tabl.header_fields %]
95 [% SWITCH header_field.field_label -%]
96 [% CASE "Add Item" -%]
98 [% CASE "Call Number" -%]
100 [% CASE "Accession Date" %]
101 <th>Accession date</th>
107 <th>[% header_field.field_label %]</th>
114 [% FOREACH text_field IN item_tabl.text_fields %]
115 [% IF ( text_field.select_field ) %]
116 <td><input type="checkbox" name="action" value="[% text_field.field_value %]"></td>
117 [% ELSIF ( text_field.link_field ) %]
119 <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>
122 <td>[% text_field.field_value %]</td>
134 [% IF ( displayprev || displaynext ) %]
136 [% IF ( displayprev ) %]
137 <a href="label-item-search.pl?startfrom=[% startfromnext %]&ccl_query=[% ccl_query %]&resultsperpage=[% resultsperpage %]&op=do_search&batch_id=[% batch_id %]"><<</a>
139 [% FOREACH number IN numbers %]
140 [% IF ( number.highlight ) %]
141 <span class="current">[% number.number %]</span>
143 <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>
146 [% IF ( displaynext ) %]
147 <a href="label-item-search.pl?startfrom=[% startfromnext %]&ccl_query=[% ccl_query %]&resultsperpage=[% resultsperpage %]&op=do_search&batch_id=[% batch_id %]">>></a>
150 <div id="closewindow"><a href="#" class="btn btn-default btn-default close">Close</a></div>
153 [% INCLUDE 'popup-bottom.inc' %]