Lines 2-18
Link Here
|
2 |
<title>Koha › Barcodes and labels › Search results</title> |
2 |
<title>Koha › Barcodes and labels › Search results</title> |
3 |
[% INCLUDE 'doc-head-close.inc' %] |
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> |
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.checkboxes.min.js"></script> |
5 |
<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.fixFloat.js"></script> |
6 |
<script type="text/javascript"> |
6 |
<script type="text/javascript"> |
7 |
//<![CDATA[ |
7 |
//<![CDATA[ |
8 |
$(document).ready(function(){ |
8 |
$(document).ready(function(){ |
9 |
$("#CheckAll").click(function(){ |
9 |
$("#toolbar").fixFloat(); |
10 |
$(".checkboxed").checkCheckboxes(); |
10 |
$("#CheckAll").click(function(e){ |
11 |
return false; |
11 |
e.preventDefault(); |
|
|
12 |
$("input[type='checkbox']").prop("checked",true); |
12 |
}); |
13 |
}); |
13 |
$("#CheckNone").click(function(){ |
14 |
$("#CheckNone").click(function(e){ |
14 |
$(".checkboxed").unCheckCheckboxes(); |
15 |
e.preventDefault(); |
15 |
return false; |
16 |
$("input[type='checkbox']").prop("checked",false); |
|
|
17 |
}); |
18 |
$("#add_items").on("click",function(){ |
19 |
add_item('checked',[% batch_id %],'[% type %]'); |
20 |
}); |
21 |
$(".select_item").on("click",function(e){ |
22 |
e.preventDefault(); |
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); |
16 |
}); |
27 |
}); |
17 |
}); |
28 |
}); |
18 |
function add_item(item_number,batch_id,type_id){ |
29 |
function add_item(item_number,batch_id,type_id){ |
Lines 40-97
Link Here
|
40 |
<div id="custom-doc" class="yui-t7"> |
51 |
<div id="custom-doc" class="yui-t7"> |
41 |
<div id="bd"> |
52 |
<div id="bd"> |
42 |
<h1>Search results</h1> |
53 |
<h1>Search results</h1> |
43 |
<div class="results"> |
54 |
<div class="pages"> |
44 |
[% IF ( displayprev || displaynext ) %] |
55 |
[% pagination_bar %] |
45 |
<p> |
56 |
</div> |
46 |
[% IF ( displayprev ) %] |
57 |
<p> |
47 |
<a href="label-item-search.pl?startfrom=[% startfromprev %]&ccl_query=[% ccl_query %]&resultsperpage=[% resultsperpage %]&op=do_search&batch_id=[% batch_id %]"><<</a> |
|
|
48 |
[% END %] |
49 |
[% FOREACH number IN numbers %] |
50 |
<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> |
51 |
[% END %] |
52 |
[% IF ( displaynext ) %] |
53 |
<a href="label-item-search.pl?startfrom=[% startfromnext %]&ccl_query=[% ccl_query %]&resultsperpage=[% resultsperpage %]&op=do_search&batch_id=[% batch_id %]">>></a> |
54 |
[% END %] |
55 |
</p> |
56 |
[% END %] |
57 |
[% IF ( results ) %] |
58 |
[% IF ( results ) %] |
58 |
<strong>Results [% from %] through [% to %] [% IF ( total ) %] of [% total %][% END %]</strong> |
59 |
<strong>Results [% from %] through [% to %] [% IF ( total ) %] of [% total %][% END %]</strong> |
59 |
[% ELSE %] |
60 |
[% ELSE %] |
60 |
No results found |
61 |
No results found |
61 |
[% END %] |
62 |
[% END %] |
62 |
</div> |
63 |
</p> |
63 |
|
64 |
|
64 |
<form name="resultform" class="checkboxed" action=""> |
65 |
<form name="resultform" action=""> |
65 |
<p><a id="CheckAll" href="#">Select all</a> <a id="CheckNone" href="#">Clear all</a> | <input type="button" value="Add checked" onclick="add_item('checked',[% batch_id %],'[% type %]'); return false;" /> |
66 |
<div id="toolbar" class="btn-toolbar"> |
66 |
<input type="button" class="close" value="Done" /></p> |
67 |
<div class="btn-group"><button type="button" class="btn btn-small" id="add_items"><i class="fa fa-plus"></i> Add checked</button></div> |
|
|
68 |
<div class="btn-group"><a href="#" class="btn btn-small close"><i class="fa fa-times-circle"></i> Done</a></div> |
69 |
</div> |
70 |
<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> |
67 |
|
71 |
|
68 |
<div id="label-search-results"> |
72 |
<div id="label-search-results"> |
69 |
<input type="hidden" name="ccl_query" value="[% ccl_query %]" /> |
73 |
<input type="hidden" name="ccl_query" value="[% ccl_query %]" /> |
70 |
[% FOREACH result_se IN result_set %] |
74 |
[% FOREACH result_se IN result_set %] |
71 |
<div style="border-bottom:1px solid #CCC;margin: .5em 0;"> |
75 |
<div style="border-bottom:1px solid #CCC;padding:1em 0;"> |
72 |
<h4>[% result_se.title |html %]</h4> |
76 |
<h4>[% result_se.title |html %]</h4> |
73 |
<p>[% IF ( result_se.author ) %]by [% result_se.author %][% END %] |
77 |
<p>[% IF ( result_se.author ) %]by [% result_se.author %][% END %] |
74 |
[[% 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> |
78 |
[[% 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> |
75 |
|
79 |
|
76 |
<table style="margin-bottom:1em;"> |
80 |
<table> |
77 |
[% FOREACH item_tabl IN result_se.item_table %] |
81 |
[% FOREACH item_tabl IN result_se.item_table %] |
78 |
[% IF ( item_tabl.header_fields ) %] |
82 |
[% IF ( item_tabl.header_fields ) %] |
79 |
<tr> |
83 |
<thead> |
80 |
[% FOREACH header_field IN item_tabl.header_fields %] |
84 |
<tr> |
81 |
<th>[% header_field.field_label %]</th> |
85 |
[% FOREACH header_field IN item_tabl.header_fields %] |
82 |
[% END %] |
86 |
[% SWITCH header_field.field_label -%] |
83 |
</tr> |
87 |
[% CASE "Add Item" -%] |
|
|
88 |
<th>Add item</th> |
89 |
[% CASE "Call Number" -%] |
90 |
<th>Call number</th> |
91 |
[% CASE "Accession Date" %] |
92 |
<th>Accession date</th> |
93 |
[% CASE "Barcode" %] |
94 |
<th>Barcode</th> |
95 |
[% CASE "Select" -%] |
96 |
<th>Select</th> |
97 |
[% CASE %] |
98 |
<th>[% header_field.field_label %]</th> |
99 |
z [% END -%] |
100 |
[% END %] |
101 |
</tr> |
102 |
</thead> |
84 |
[% ELSE %] |
103 |
[% ELSE %] |
85 |
<tr> |
104 |
<tr> |
86 |
[% FOREACH text_field IN item_tabl.text_fields %] |
105 |
[% FOREACH text_field IN item_tabl.text_fields %] |
87 |
[% IF ( text_field.select_field ) %] |
106 |
[% IF ( text_field.select_field ) %] |
88 |
<td align="center"><input type="checkbox" name="action" value="[% text_field.field_value %]"></td> |
107 |
<td><input type="checkbox" name="action" value="[% text_field.field_value %]"></td> |
89 |
[% ELSIF ( text_field.link_field ) %] |
108 |
[% ELSIF ( text_field.link_field ) %] |
90 |
<td align="center"> |
109 |
<td> |
91 |
<a onclick="add_item('[% text_field.field_value %]',[% batch_id %], '[% text_field.type %]'); return false" href="/cgi-bin/koha/barcodes/label-edit-batch.pl?op=add&batch_id=[% batch_id %]&item_number=[% text_field.field_value %]">Add</a> |
110 |
<a class="btn btn-mini 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> |
92 |
</td> |
111 |
</td> |
93 |
[% ELSE %] |
112 |
[% ELSE %] |
94 |
<td align="center">[% text_field.field_value %]</td> |
113 |
<td>[% text_field.field_value %]</td> |
95 |
[% END %] |
114 |
[% END %] |
96 |
[% END %] |
115 |
[% END %] |
97 |
</tr> |
116 |
</tr> |
Lines 103-125
Link Here
|
103 |
</div> |
122 |
</div> |
104 |
</form> |
123 |
</form> |
105 |
</div> |
124 |
</div> |
106 |
<div class="results"> |
|
|
107 |
[% IF ( displayprev || displaynext ) %] |
125 |
[% IF ( displayprev || displaynext ) %] |
108 |
<p> |
126 |
<div class="pages"> |
109 |
[% IF ( displayprev ) %] |
127 |
[% pagination_bar %] |
110 |
<a href="label-item-search.pl?startfrom=[% startfromnext %]&ccl_query=[% ccl_query %]&resultsperpage=[% resultsperpage %]&op=do_search&batch_id=[% batch_id %]"><<</a> |
128 |
</div> |
111 |
[% END %] |
129 |
[% END %] |
112 |
[% FOREACH number IN numbers %] |
130 |
<div id="closewindow"><a href="#" class="btn btn-default close">Close</a></div> |
113 |
[% IF ( number.highlight ) %] |
|
|
114 |
<span class="current">[% number.number %]</span> |
115 |
[% ELSE %] |
116 |
<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> |
117 |
[% END %] |
118 |
[% END %] |
119 |
[% IF ( displaynext ) %] |
120 |
<a href="label-item-search.pl?startfrom=[% startfromnext %]&ccl_query=[% ccl_query %]&resultsperpage=[% resultsperpage %]&op=do_search&batch_id=[% batch_id %]">>></a> |
121 |
[% END %] |
122 |
</p> |
123 |
[% END %] |
124 |
</div> |
125 |
[% INCLUDE 'popup-bottom.inc' %] |
131 |
[% INCLUDE 'popup-bottom.inc' %] |