[% INCLUDE 'doc-head-open.inc' %]
- <title>Koha › Tools › Patron card creator › Manage patron card batches</title>
+ <title>Koha › Tools › Patron card creator › Batches › [% IF batch_id %]Edit ([% batch_id %])[% ELSE %]New[% END %]</title>
[% INCLUDE 'doc-head-close.inc' %]
[% INCLUDE 'greybox.inc' %]
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
function Remove() {
items = new Array;
item_num = new Array;
+
if(document.items.action.length > 0) {
for (var i=0; i < document.items.action.length; i++) {
if (document.items.action[i].checked) {
item_num.push(i+1);
}
}
- if (items.length < 1) {
- alert(_("Please select at least one item to delete."));
- return; // no item selected
- }
getstr = items.join("&");
item_msg = item_num.join(", ");
var msg = _("Are you sure you want to remove card number(s): %s from this batch?").format(item_msg);
+ } else if (document.items.action.checked) {
+ alert(_("Deletion of patron from a batch with only one patron will delete the batch.") + "\n\n" + _("If this is what you want, select the 'Delete batch' option from the toolbar"));
+ return; // no deletion for single item batch
}
else {
- alert(_("Please select at least label to delete."));
+ alert(_("Please select at least one patron to delete."));
return; // no item selected
}
var answer = confirm(msg);
alert(_("Please select at least one card to export."));
return; // no batch selected
}
- return GB_showCenter(_("Export patron cards"), "/cgi-bin/koha/patroncards/print.pl?batch_id=[% batch_id %]&" + getstr, 700, 800);
+ return GB_showCenter(_("Export patron cards"), "/cgi-bin/koha/patroncards/print.pl?batch_id=[% batch_id %]&" + getstr, 400, 800);
}
else if (mode == 'batch') {
- return GB_showCenter(_("Export patron cards"), "/cgi-bin/koha/patroncards/print.pl?batch_id=[% batch_id %]", 700, 800);
+ return GB_showCenter(_("Export patron cards"), "/cgi-bin/koha/patroncards/print.pl?batch_id=[% batch_id %]", 400, 800);
}
else {
// some pass-thru error trapping just in case...
{ "aTargets": [ -2, -1 ], "bSortable": false, "bSearchable": false }
],
"aaSorting": [[ 0, "asc" ]],
- "sPaginationType": "four_button"
+ "sPaginationType": "four_button",
+ "autoWidth": false
}));
$("#additems").click(function(){
Add();
<a href="/cgi-bin/koha/mainpage.pl">Home</a> ›
<a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> ›
<a href="/cgi-bin/koha/patroncards/home.pl">Patron card creator</a> ›
- <a href="/cgi-bin/koha/patroncards/manage.pl?card_element=batch">Manage patron card batches</a> ›
+ <a href="/cgi-bin/koha/patroncards/manage.pl?card_element=batch">Batches</a> ›
[% IF batch_id %]
- Manage batch number [% batch_id %]
+ Edit ([% batch_id %])
[% ELSE %]
- Create new batch
+ New
[% END %]
</div>
<div id="doc3" class="yui-t2">
[% IF ( duplicate_message ) %]
<div class="dialog message">
- <strong>[% duplicate_count %] duplicate item(s) found</strong> and removed from batch [% batch_id %].
+ <strong>Duplicate patrons removed from batch number [% batch_id %]: [% duplicate_count %]</strong>
</div>
[% END %]
</div>
</form>
<div id="batch-manage" class="action">
- <a class="btn btn-small" id="additems" href="#"><icon class="icon-plus"></icon> Add patron(s)</a>[% IF ( table_loop ) %]
- <a class="btn btn-small" id="removeitems" href="#"><icon class="icon-trash"></icon> Remove selected patrons</a>
- <a class="btn btn-small" id="deduplicate" href="#"><icon class="icon-minus"></icon> Remove duplicates</a>
- <a class="btn btn-small" id="exportitems" href="#"><icon class="icon-share"></icon> Export selected card(s)</a>
- <a class="btn btn-small" id="exportbatch" href="#"><icon class="icon-share"></icon> Export card batch</a>[% END %]
+ <a class="btn btn-small" id="additems" href="#"><icon class="fa fa-plus"></icon> Add patron(s)</a>[% IF ( table_loop ) %]
+ <a class="btn btn-small" id="removeitems" href="#"><icon class="fa fa-trash"></icon> Remove selected patrons</a>
+ <a class="btn btn-small" id="deletebatch" href="#"><icon class="fa fa-minus-square"></icon> Delete batch</a>
+ <a class="btn btn-small" id="deduplicate" href="#"><icon class="fa fa-minus"></icon> Remove duplicates</a>
+ <a class="btn btn-small" id="exportitems" href="#"><icon class="fa fa-share-square-o"></icon> Export selected card(s)</a>
+ <a class="btn btn-small" id="exportbatch" href="#"><icon class="fa fa-share-square-o"></icon> Export card batch</a>[% END %]
</div>
[% IF ( table_loop ) %]
<form name="items" class="checkboxed">
- <h2>Items in batch number [% batch_id %]</h2>
+ <h2>Patrons in batch number [% batch_id %]</h2>
<table id="batcht">
[% FOREACH table_loo IN table_loop %]
[% IF ( table_loo.header_fields ) %]
[% FOREACH text_field IN table_loo.text_fields %]
[% IF ( text_field.select_field ) %]
<td>
- <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>
- <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>
+ <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="fa fa-trash"></icon> Delete</a>
+ <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="fa fa-share-square-o"></icon> Export</a>
</td>
<td><input type="checkbox" name="action" value="[% text_field.field_value %]" /></td>
[% ELSE %]
<fieldset class="rows" style="border-bottom: 0px; border: 0px;">
<ol><li>
<div class="dialog message">
- <h4>There are no items in this batch yet</h4>
- <p>Add items by borrowernumber using the text area above or leave empty to add via patron search.</p>
+ <h4>There are no patrons in this batch yet</h4>
+ <p>Add patrons by borrowernumber using the text area above or leave empty to add via patron search.</p>
</div>
</li></ol>
</fieldset>
</div>
</div>
</div>
+ <div class="yui-b">
+ [% INCLUDE 'tools-menu.inc' %]
+ </div>
</div>
[% INCLUDE 'intranet-bottom.inc' %]