|
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-48
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="results"> |
| 44 |
[% IF ( displayprev || displaynext ) %] |
55 |
[% IF ( displayprev || displaynext ) %] |
| 45 |
<p> |
56 |
<p> |
| 46 |
[% IF ( displayprev ) %] |
57 |
[% IF ( displayprev ) %] |
| 47 |
<a href="label-item-search.pl?startfrom=[% startfromprev %]&ccl_query=[% ccl_query %]&resultsperpage=[% resultsperpage %]&op=do_search&batch_id=[% batch_id %]"><<</a> |
58 |
<a href="label-item-search.pl?startfrom=[% startfromprev %]&ccl_query=[% ccl_query %]&resultsperpage=[% resultsperpage %]&op=do_search&batch_id=[% batch_id %]"><<</a> |
| 48 |
[% END %] |
59 |
[% END %] |
|
Lines 52-97
Link Here
|
| 52 |
[% IF ( displaynext ) %] |
63 |
[% 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> |
64 |
<a href="label-item-search.pl?startfrom=[% startfromnext %]&ccl_query=[% ccl_query %]&resultsperpage=[% resultsperpage %]&op=do_search&batch_id=[% batch_id %]">>></a> |
| 54 |
[% END %] |
65 |
[% END %] |
| 55 |
</p> |
66 |
</p> |
| 56 |
[% END %] |
67 |
[% END %] |
| 57 |
[% IF ( results ) %] |
68 |
[% IF ( results ) %] |
| 58 |
<strong>Results [% from %] through [% to %] [% IF ( total ) %] of [% total %][% END %]</strong> |
69 |
<strong>Results [% from %] through [% to %] [% IF ( total ) %] of [% total %][% END %]</strong> |
| 59 |
[% ELSE %] |
70 |
[% ELSE %] |
| 60 |
No results found |
71 |
No results found |
| 61 |
[% END %] |
72 |
[% END %] |
| 62 |
</div> |
|
|
| 63 |
|
73 |
|
| 64 |
<form name="resultform" class="checkboxed" action=""> |
74 |
<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;" /> |
75 |
<div id="toolbar" class="btn-toolbar"> |
| 66 |
<input type="button" class="close" value="Done" /></p> |
76 |
<div class="btn-group"><button type="button" class="btn btn-small" id="add_items"><i class="fa fa-plus"></i> Add checked</button></div> |
|
|
77 |
<div class="btn-group"><a href="#" class="btn btn-small close"><i class="fa fa-times-circle"></i> Done</a></div> |
| 78 |
</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> |
| 67 |
|
80 |
|
| 68 |
<div id="label-search-results"> |
81 |
<div id="label-search-results"> |
| 69 |
<input type="hidden" name="ccl_query" value="[% ccl_query %]" /> |
82 |
<input type="hidden" name="ccl_query" value="[% ccl_query %]" /> |
| 70 |
[% FOREACH result_se IN result_set %] |
83 |
[% FOREACH result_se IN result_set %] |
| 71 |
<div style="border-bottom:1px solid #CCC;margin: .5em 0;"> |
84 |
<div style="border-bottom:1px solid #CCC;padding:1em 0;"> |
| 72 |
<h4>[% result_se.title |html %]</h4> |
85 |
<h4>[% result_se.title |html %]</h4> |
| 73 |
<p>[% IF ( result_se.author ) %]by [% result_se.author %][% END %] |
86 |
<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> |
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> |
| 75 |
|
88 |
|
| 76 |
<table style="margin-bottom:1em;"> |
89 |
<table> |
| 77 |
[% FOREACH item_tabl IN result_se.item_table %] |
90 |
[% FOREACH item_tabl IN result_se.item_table %] |
| 78 |
[% IF ( item_tabl.header_fields ) %] |
91 |
[% IF ( item_tabl.header_fields ) %] |
| 79 |
<tr> |
92 |
<thead> |
| 80 |
[% FOREACH header_field IN item_tabl.header_fields %] |
93 |
<tr> |
| 81 |
<th>[% header_field.field_label %]</th> |
94 |
[% FOREACH header_field IN item_tabl.header_fields %] |
| 82 |
[% END %] |
95 |
[% SWITCH header_field.field_label -%] |
| 83 |
</tr> |
96 |
[% CASE "Add Item" -%] |
|
|
97 |
<th>Add item</th> |
| 98 |
[% CASE "Call Number" -%] |
| 99 |
<th>Call number</th> |
| 100 |
[% CASE "Accession Date" %] |
| 101 |
<th>Accession date</th> |
| 102 |
[% CASE "Barcode" %] |
| 103 |
<th>Barcode</th> |
| 104 |
[% CASE "Select" -%] |
| 105 |
<th>Select</th> |
| 106 |
[% CASE %] |
| 107 |
<th>[% header_field.field_label %]</th> |
| 108 |
z [% END -%] |
| 109 |
[% END %] |
| 110 |
</tr> |
| 111 |
</thead> |
| 84 |
[% ELSE %] |
112 |
[% ELSE %] |
| 85 |
<tr> |
113 |
<tr> |
| 86 |
[% FOREACH text_field IN item_tabl.text_fields %] |
114 |
[% FOREACH text_field IN item_tabl.text_fields %] |
| 87 |
[% IF ( text_field.select_field ) %] |
115 |
[% IF ( text_field.select_field ) %] |
| 88 |
<td align="center"><input type="checkbox" name="action" value="[% text_field.field_value %]"></td> |
116 |
<td><input type="checkbox" name="action" value="[% text_field.field_value %]"></td> |
| 89 |
[% ELSIF ( text_field.link_field ) %] |
117 |
[% ELSIF ( text_field.link_field ) %] |
| 90 |
<td align="center"> |
118 |
<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> |
119 |
<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> |
120 |
</td> |
| 93 |
[% ELSE %] |
121 |
[% ELSE %] |
| 94 |
<td align="center">[% text_field.field_value %]</td> |
122 |
<td>[% text_field.field_value %]</td> |
| 95 |
[% END %] |
123 |
[% END %] |
| 96 |
[% END %] |
124 |
[% END %] |
| 97 |
</tr> |
125 |
</tr> |
|
Lines 99-110
Link Here
|
| 99 |
[% END %] |
127 |
[% END %] |
| 100 |
</table> |
128 |
</table> |
| 101 |
</div> |
129 |
</div> |
| 102 |
[% END %] |
130 |
[% END %] |
| 103 |
</div> |
131 |
</div> |
| 104 |
</form> |
132 |
</form> |
| 105 |
</div> |
133 |
</div> |
| 106 |
<div class="results"> |
134 |
[% IF ( displayprev || displaynext ) %] |
| 107 |
[% IF ( displayprev || displaynext ) %] |
|
|
| 108 |
<p> |
135 |
<p> |
| 109 |
[% IF ( displayprev ) %] |
136 |
[% IF ( displayprev ) %] |
| 110 |
<a href="label-item-search.pl?startfrom=[% startfromnext %]&ccl_query=[% ccl_query %]&resultsperpage=[% resultsperpage %]&op=do_search&batch_id=[% batch_id %]"><<</a> |
137 |
<a href="label-item-search.pl?startfrom=[% startfromnext %]&ccl_query=[% ccl_query %]&resultsperpage=[% resultsperpage %]&op=do_search&batch_id=[% batch_id %]"><<</a> |
|
Lines 115-125
Link Here
|
| 115 |
[% ELSE %] |
142 |
[% 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> |
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> |
| 117 |
[% END %] |
144 |
[% END %] |
| 118 |
[% END %] |
145 |
[% END %] |
| 119 |
[% IF ( displaynext ) %] |
146 |
[% 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> |
147 |
<a href="label-item-search.pl?startfrom=[% startfromnext %]&ccl_query=[% ccl_query %]&resultsperpage=[% resultsperpage %]&op=do_search&batch_id=[% batch_id %]">>></a> |
| 121 |
[% END %] |
148 |
[% END %] |
| 122 |
</p> |
149 |
</p> |
|
|
150 |
<div id="closewindow"><a href="#" class="btn btn-default close">Close</a></div> |
| 123 |
[% END %] |
151 |
[% END %] |
| 124 |
</div> |
152 |
</div> |
| 125 |
[% INCLUDE 'popup-bottom.inc' %] |
153 |
[% INCLUDE 'popup-bottom.inc' %] |
| 126 |
- |
|
|