|
Lines 6-11
Link Here
|
| 6 |
[% INCLUDE 'datatables.inc' %] |
6 |
[% INCLUDE 'datatables.inc' %] |
| 7 |
<script type="text/javascript"> |
7 |
<script type="text/javascript"> |
| 8 |
//<![CDATA[ |
8 |
//<![CDATA[ |
|
|
9 |
var MSG_CONFIRM_DELETE = _("Are you sure you want to delete this patron from the card batch?"); |
| 9 |
function DeleteConfirm() { |
10 |
function DeleteConfirm() { |
| 10 |
var msg = _("Are you sure you want to delete batch %s?").format("[% batch_id %]"); |
11 |
var msg = _("Are you sure you want to delete batch %s?").format("[% batch_id %]"); |
| 11 |
var answer = confirm(msg); |
12 |
var answer = confirm(msg); |
|
Lines 88-97
Link Here
|
| 88 |
alert(_("Please select at least one card to export.")); |
89 |
alert(_("Please select at least one card to export.")); |
| 89 |
return; // no batch selected |
90 |
return; // no batch selected |
| 90 |
} |
91 |
} |
| 91 |
return GB_showCenter(_("Export labels"), "/cgi-bin/koha/patroncards/print.pl?batch_id=[% batch_id %]&" + getstr, 700, 800); |
92 |
return GB_showCenter(_("Export patron cards"), "/cgi-bin/koha/patroncards/print.pl?batch_id=[% batch_id %]&" + getstr, 700, 800); |
| 92 |
} |
93 |
} |
| 93 |
else if (mode == 'batch') { |
94 |
else if (mode == 'batch') { |
| 94 |
return GB_showCenter(_("Export labels"), "/cgi-bin/koha/patroncards/print.pl?batch_id=[% batch_id %]", 700, 800); |
95 |
return GB_showCenter(_("Export patron cards"), "/cgi-bin/koha/patroncards/print.pl?batch_id=[% batch_id %]", 700, 800); |
| 95 |
} |
96 |
} |
| 96 |
else { |
97 |
else { |
| 97 |
// some pass-thru error trapping just in case... |
98 |
// some pass-thru error trapping just in case... |
|
Lines 117-125
Link Here
|
| 117 |
$(document).ready(function() { |
118 |
$(document).ready(function() { |
| 118 |
$("#batcht").dataTable($.extend(true, {}, dataTablesDefaults, { |
119 |
$("#batcht").dataTable($.extend(true, {}, dataTablesDefaults, { |
| 119 |
"aoColumnDefs": [ |
120 |
"aoColumnDefs": [ |
| 120 |
{ "aTargets": [ -1 ], "bSortable": false, "bSearchable": false } |
121 |
{ "aTargets": [ -2, -1 ], "bSortable": false, "bSearchable": false } |
| 121 |
], |
122 |
], |
| 122 |
"aaSorting": [[ 1, "asc" ]], |
123 |
"aaSorting": [[ 0, "asc" ]], |
| 123 |
"sPaginationType": "four_button" |
124 |
"sPaginationType": "four_button" |
| 124 |
})); |
125 |
})); |
| 125 |
$("#additems").click(function(){ |
126 |
$("#additems").click(function(){ |
|
Lines 168-182
Link Here
|
| 168 |
<div id="bd"> |
169 |
<div id="bd"> |
| 169 |
<div id="yui-main"> |
170 |
<div id="yui-main"> |
| 170 |
<div class="yui-b"> |
171 |
<div class="yui-b"> |
|
|
172 |
<div class="yui-g"> |
| 173 |
[% INCLUDE 'patroncards-toolbar.inc' %] |
| 174 |
<div class="yui-u first"> |
| 171 |
|
175 |
|
| 172 |
<div id="toolbar" class="btn-toolbar"> |
176 |
</div> |
| 173 |
<a class="btn btn-small" id="additems" href="#">Add item(s)</a>[% IF ( table_loop ) %] |
177 |
</div> |
| 174 |
<a class="btn btn-small" id="removeitems" href="#">Remove item(s)</a> |
|
|
| 175 |
<a class="btn btn-small" id="deletebatch" href="#">Delete batch</a> |
| 176 |
<a class="btn btn-small" id="deduplicate" href="#">Remove duplicates</a> |
| 177 |
<a class="btn btn-small" id="exportitems" href="#">Export item(s)</a> |
| 178 |
<a class="btn btn-small" id="exportbatch" href="#">Export batch</a>[% END %] |
| 179 |
</div> |
| 180 |
|
178 |
|
| 181 |
[% IF ( duplicate_message ) %] |
179 |
[% IF ( duplicate_message ) %] |
| 182 |
<div class="dialog message"> |
180 |
<div class="dialog message"> |
|
Lines 201-206
Link Here
|
| 201 |
</fieldset> |
199 |
</fieldset> |
| 202 |
</div> |
200 |
</div> |
| 203 |
</form> |
201 |
</form> |
|
|
202 |
<div id="batch-manage" class="action"> |
| 203 |
<a class="btn btn-small" id="additems" href="#"><icon class="icon-plus"></icon> Add patron(s)</a>[% IF ( table_loop ) %] |
| 204 |
<a class="btn btn-small" id="removeitems" href="#"><icon class="icon-trash"></icon> Remove selected patrons</a> |
| 205 |
<a class="btn btn-small" id="deduplicate" href="#"><icon class="icon-minus"></icon> Remove duplicates</a> |
| 206 |
<a class="btn btn-small" id="exportitems" href="#"><icon class="icon-share"></icon> Export selected card(s)</a> |
| 207 |
<a class="btn btn-small" id="exportbatch" href="#"><icon class="icon-share"></icon> Export card batch</a>[% END %] |
| 208 |
</div> |
| 204 |
[% IF ( table_loop ) %] |
209 |
[% IF ( table_loop ) %] |
| 205 |
<form name="items" class="checkboxed"> |
210 |
<form name="items" class="checkboxed"> |
| 206 |
<h2>Items in batch number [% batch_id %]</h2> |
211 |
<h2>Items in batch number [% batch_id %]</h2> |
|
Lines 211-222
Link Here
|
| 211 |
<tr> |
216 |
<tr> |
| 212 |
[% FOREACH header_field IN table_loo.header_fields %] |
217 |
[% FOREACH header_field IN table_loo.header_fields %] |
| 213 |
[% SWITCH header_field.field_label -%] |
218 |
[% SWITCH header_field.field_label -%] |
| 214 |
[% CASE "Card Number" -%] |
|
|
| 215 |
<th>Card number</th> |
| 216 |
[% CASE "Summary" -%] |
219 |
[% CASE "Summary" -%] |
| 217 |
<th>Summary</th> |
220 |
<th>Borrower name</th> |
| 218 |
[% CASE "Borrower Number" %] |
221 |
[% CASE "Borrower Number" %] |
| 219 |
<th>Borrower number</th> |
222 |
<th>Borrower number</th> |
|
|
223 |
[% CASE "Actions " %] |
| 224 |
<th>Actions</th> |
| 220 |
[% CASE "Select" -%] |
225 |
[% CASE "Select" -%] |
| 221 |
<th>Select</th> |
226 |
<th>Select</th> |
| 222 |
[% CASE %] |
227 |
[% CASE %] |
|
Lines 230-235
Link Here
|
| 230 |
<tr> |
235 |
<tr> |
| 231 |
[% FOREACH text_field IN table_loo.text_fields %] |
236 |
[% FOREACH text_field IN table_loo.text_fields %] |
| 232 |
[% IF ( text_field.select_field ) %] |
237 |
[% IF ( text_field.select_field ) %] |
|
|
238 |
<td> |
| 239 |
<a class="btn btn-mini" onclick="return confirm(MSG_CONFIRM_DELETE);" href="/cgi-bin/koha/patroncards/edit-batch.pl?op=remove&batch_id=[% batch_id %]&label_id=[% text_field.field_value %]"><icon class="icon-trash"></icon> Delete</a> |
| 240 |
<a class="btn btn-mini" href="#" onclick="GB_showCenter('Export single card','/cgi-bin/koha/patroncards/print.pl?batch_id=[% batch_id %]&label_id=[% text_field.field_value %]')"><icon class="icon-share"></icon> Export</a> |
| 241 |
</td> |
| 233 |
<td><input type="checkbox" name="action" value="[% text_field.field_value %]" /></td> |
242 |
<td><input type="checkbox" name="action" value="[% text_field.field_value %]" /></td> |
| 234 |
[% ELSE %] |
243 |
[% ELSE %] |
| 235 |
<td>[% text_field.field_value %]</td> |
244 |
<td>[% text_field.field_value %]</td> |