<div id="navmenu"><ul id="navmenulist">
<li><a href="/cgi-bin/koha/patroncards/home.pl">Patron card creator home</a></li>
- <li><a href="/cgi-bin/koha/patroncards/manage.pl?card_element=layout">Manage layouts</a></li>
- <li><a href="/cgi-bin/koha/patroncards/manage.pl?card_element=template">Manage templates</a></li>
- <li><a href="/cgi-bin/koha/patroncards/manage.pl?card_element=profile">Manage profiles</a></li>
- <li><a href="/cgi-bin/koha/patroncards/manage.pl?card_element=batch">Manage batches</a></li>
- <li><a href="/cgi-bin/koha/patroncards/image-manage.pl">Manage images</a></li>
</ul>
</div>
<div id="toolbar" class="btn-toolbar">
- <a class="btn btn-small" id="layouts" href="/cgi-bin/koha/patroncards/edit-layout.pl?op=new">New layout</a>
- <a class="btn btn-small" id="templates" href="/cgi-bin/koha/patroncards/edit-template.pl?op=new">New template</a>
- <a class="btn btn-small" id="profiles" href="/cgi-bin/koha/patroncards/edit-profile.pl?op=new">New profile</a>
- <a class="btn btn-small" id="batches" href="/cgi-bin/koha/patroncards/edit-batch.pl?op=new">New batch</a>
+ <div class="btn-group">
+ <button class="btn btn-small dropdown-toggle" data-toggle="dropdown"><i class="icon-plus"></i> New <span class="caret"></span></button>
+ <ul class="dropdown-menu">
+ <li><a href="/cgi-bin/koha/patroncards/edit-batch.pl?op=new">Card batch</a></li>
+ <li><a href="/cgi-bin/koha/patroncards/image-manage.pl">Image</a></li>
+ <li><a href="/cgi-bin/koha/patroncards/edit-layout.pl?op=new">Layout</a></li>
+ <li><a href="/cgi-bin/koha/patroncards/edit-template.pl?op=new">Card template</a></li>
+ <li><a href="/cgi-bin/koha/patroncards/edit-profile.pl?op=new">Printer profile</a></li>
+ </ul>
+ </div>
+ <div class="btn-group">
+ <button class="btn btn-small dropdown-toggle" data-toggle="dropdown"><i class="icon-edit"></i> Manage <span class="caret"></span></button>
+ <ul class="dropdown-menu">
+ <li><a href="/cgi-bin/koha/patroncards/manage.pl?card_element=batch">Card batches</a></li>
+ <li><a href="/cgi-bin/koha/patroncards/image-manage.pl">Images</a></li>
+ <li><a href="/cgi-bin/koha/patroncards/manage.pl?card_element=layout">Layouts</a></li>
+ <li><a href="/cgi-bin/koha/patroncards/manage.pl?card_element=template">Card templates</a></li>
+ <li><a href="/cgi-bin/koha/patroncards/manage.pl?card_element=profile">Printer profiles</a></li>
+ </ul>
+ </div>
</div>
</li>
</ol>
<fieldset class="action">
- <input type="submit" value="Search" />
+ <input class="btn btn-default" type="submit" value="Search" />
</fieldset>
</fieldset>
<form>
</table>
</div>
-<div id="closewindow"><a href="#" class="close">Close</a></div>
+<div id="closewindow"><a href="#" class="btn btn-default close">Close</a></div>
</div>
</div>
[% INCLUDE 'intranet-bottom.inc' %]
[% INCLUDE 'datatables.inc' %]
<script type="text/javascript">
//<![CDATA[
+ var MSG_CONFIRM_DELETE = _("Are you sure you want to delete this patron from the card batch?");
function DeleteConfirm() {
var msg = _("Are you sure you want to delete batch %s?").format("[% batch_id %]");
var answer = confirm(msg);
alert(_("Please select at least one card to export."));
return; // no batch selected
}
- return GB_showCenter(_("Export labels"), "/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, 700, 800);
}
else if (mode == 'batch') {
- return GB_showCenter(_("Export labels"), "/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 %]", 700, 800);
}
else {
// some pass-thru error trapping just in case...
$(document).ready(function() {
$("#batcht").dataTable($.extend(true, {}, dataTablesDefaults, {
"aoColumnDefs": [
- { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false }
+ { "aTargets": [ -2, -1 ], "bSortable": false, "bSearchable": false }
],
- "aaSorting": [[ 1, "asc" ]],
+ "aaSorting": [[ 0, "asc" ]],
"sPaginationType": "four_button"
}));
$("#additems").click(function(){
<div id="bd">
<div id="yui-main">
<div class="yui-b">
+ <div class="yui-g">
+ [% INCLUDE 'patroncards-toolbar.inc' %]
+ <div class="yui-u first">
- <div id="toolbar" class="btn-toolbar">
- <a class="btn btn-small" id="additems" href="#">Add item(s)</a>[% IF ( table_loop ) %]
- <a class="btn btn-small" id="removeitems" href="#">Remove item(s)</a>
- <a class="btn btn-small" id="deletebatch" href="#">Delete batch</a>
- <a class="btn btn-small" id="deduplicate" href="#">Remove duplicates</a>
- <a class="btn btn-small" id="exportitems" href="#">Export item(s)</a>
- <a class="btn btn-small" id="exportbatch" href="#">Export batch</a>[% END %]
- </div>
+ </div>
+ </div>
[% IF ( duplicate_message ) %]
<div class="dialog message">
</fieldset>
</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 %]
+ </div>
[% IF ( table_loop ) %]
<form name="items" class="checkboxed">
<h2>Items in batch number [% batch_id %]</h2>
<tr>
[% FOREACH header_field IN table_loo.header_fields %]
[% SWITCH header_field.field_label -%]
- [% CASE "Card Number" -%]
- <th>Card number</th>
[% CASE "Summary" -%]
- <th>Summary</th>
+ <th>Borrower name</th>
[% CASE "Borrower Number" %]
<th>Borrower number</th>
+ [% CASE "Actions " %]
+ <th>Actions</th>
[% CASE "Select" -%]
<th>Select</th>
[% CASE %]
<tr>
[% 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>
+ </td>
<td><input type="checkbox" name="action" value="[% text_field.field_value %]" /></td>
[% ELSE %]
<td>[% text_field.field_value %]</td>
<div id="bd">
<div id="yui-main">
<div class="yui-b">
+ <div class="yui-g">
+ [% INCLUDE 'patroncards-toolbar.inc' %]
+ <div class="yui-u first">
+
+ </div>
+ </div>
+
<!-- NOTE: The order of the elements on this form is crictical to correct processing. You've been warned... -->
<form name="input" action="/cgi-bin/koha/patroncards/edit-layout.pl" method="get">
<div class="yui-g">
<div class="yui-g first">
<fieldset class="rows">
- <legend>[% IF ( layout_id ) %]Edit[% ELSE %]Create[% END %] Patron card text layout</legend>
+ <legend>[% IF ( layout_id ) %]Edit[% ELSE %]Create[% END %] patron card text layout</legend>
<ol>
<li>
<fieldset>
</div>
<div class="yui-g">
<fieldset class="rows">
- <legend>[% IF ( layout_id ) %]Edit[% ELSE %]Create[% END %] Patron card graphic layout</legend>
+ <legend>[% IF ( layout_id ) %]Edit[% ELSE %]Create[% END %] patron card graphic layout</legend>
<ol>
<!--
<li>
</div>
</div>
<fieldset class="action">
- <input type="submit" value="Save" />
+ <input class="btn btn-default" type="submit" value="Save" />
<a class="cancel" href="/cgi-bin/koha/patroncards/manage.pl?card_element=layout">Cancel</a>
<input type="hidden" name="op" value="save" />
<input type="hidden" name="layout_id" value="[% layout_id %]" />
<div id="bd">
<div id="yui-main">
<div class="yui-b">
+ <div class="yui-g">
+ [% INCLUDE 'patroncards-toolbar.inc' %]
+ <div class="yui-u first">
+
+ </div>
+ </div>
<div class="yui-g">
<h3>Edit printer profile</h3>
<div class="yui-g first">
<div id="bd">
<div id="yui-main">
<div class="yui-b">
+ <div class="yui-g">
+ [% INCLUDE 'patroncards-toolbar.inc' %]
+ <div class="yui-u first">
+
+ </div>
+ </div>
<form name="input" action="/cgi-bin/koha/patroncards/edit-template.pl" method="get">
<div class="yui-g">
<h3>Edit patron card template</h3>
<div class="yui-g">
[% INCLUDE 'patroncards-toolbar.inc' %]
<div class="yui-u first">
- <div class="justify homeimage">
- <div class="lci_01"></div>
- <div class="lci_02"></div>
- <div class="lci_03"></div>
- <h2>Welcome to Koha's Patron card creator module</h2>
- <p>The Patron card creator allow you to use layouts and templates which you design to print a nearly unlimited variety of patron cards including barcodes. Here are some of the features of the Patron card creator module:</p>
- <ul>
- <li>Customize patron card layouts</li>
- <li>Design custom card templates for printed patron cards</li>
- <li>Build and manage batches of patron cards</li>
- <li>Export single or multiple batches</li>
- <li>Export single or multiple patron cards from within a batch</li>
- <li>Export card data as a PDF readable by any standard PDF reader, making patron cards printable directly on a printer</li>
- </ul>
- <p>At the top of each screen within the Patron card creator, you will see a toolbar allowing quick access to relevant functions. The menu to the left of each screen also allows easy access to the different sections of the Patron card creator. The breadcrumb trail near the top of each screen will give specific indication as to where you are within the Patron Card Creator module and allow quick navigation to previously traversed sections. And finally, you can find more detailed information on each section of the Patron card creator by clicking the online help link at the upper left-hand corner of every page.</p>
- <p>The developers of the Patron card creator module hope you will find this an extremely useful tool. You are encouraged to submit any enhancement requests as well as any bugs via <a href="http://bugs.koha-community.org/">Koha Project Bugzilla</a>.</p>
- </div>
</div>
</div>
</div>
[% INCLUDE 'doc-head-close.inc' %]
<script type="text/javascript">
//<![CDATA[
+ var MSG_CONFIRM_DELETE = _("Are you sure you want to delete this image?");
function DeleteConfirm() {
var results = selected_images("delete");
if (results.images != -1) {
<div id="bd">
<div id="yui-main">
<div class="yui-b">
+ <div class="yui-g">
+ [% INCLUDE 'patroncards-toolbar.inc' %]
+ <div class="yui-u first">
+
+ </div>
+ </div>
[% INCLUDE 'patroncards-errors.inc' %]
<div class="yui-g">
<div class="yui-u first">
<h1>Upload Images</h1>
- [% IF ( IMPORT_SUCCESSFUL ) %]
- <div id="dialog" class="dialog message">
- <h3>Image successfully uploaded</h3>
- <ul><li>File: [% SOURCE_FILE %]</li>
- <li>Image name: [% IMAGE_NAME %]</li></ul>
- </div>
- [% END %]
<form name="upload_images" method="post" action="/cgi-bin/koha/patroncards/image-manage.pl" enctype="multipart/form-data">
<fieldset class="brief">
<div class="hint">
<input type="text" id="image_name" name="image_name" size="20" />
</li>
</ol>
+ <div class="action">
+ <input type="hidden" name="op" value="upload" />
+ <input class="btn btn-default" id="uploadsu" type="submit" value="Upload" />
+ </div>
+ [% IF ( IMPORT_SUCCESSFUL ) %]
+ <div class="dialog message">
+ <h3>Image successfully uploaded</h3>
+ <ul><li>File: [% SOURCE_FILE %]</li>
+ <li>Image name: [% IMAGE_NAME %]</li></ul>
+ </div>
+ [% END %]
</fieldset>
- <fieldset class="action">
- <input type="hidden" name="op" value="upload" />
- <input id="uploadsu" type="submit" value="Upload" />
- <a id="cancelul" href="/cgi-bin/koha/patroncards/home.pl" class="cancel">Cancel</a>
- </fieldset>
+
</form>
</div>
<div class="yui-u">
<h1>Delete Images</h1>
- [% IF ( DELETE_SUCCESSFULL ) %]
- <div id="dialog" class="dialog message">
- <h3>Image(s) successfully deleted</h3>
- </div>
- [% END %]
[% IF ( TABLE ) %]
<form name="delete_images" method="post" action="/cgi-bin/koha/patroncards/image-manage.pl" enctype="multipart/form-data">
<fieldset class="brief">
</div>
<table>
[% FOREACH TABL IN TABLE %]
+
[% IF ( TABL.header_fields ) %]
+
<tr>
[% FOREACH header_field IN TABL.header_fields %]
- <th>[% header_field.field_label %]</th>
+ [% SWITCH header_field.field_label -%]
+ [% CASE "ID" %]
+ <th>Image ID</th>
+ [% CASE "Name" %]
+ <th>Name</th>
+ [% CASE " " %]
+ <th>Delete</th>
+ [% CASE %]
+ <th>[% header_field.field_label %]</th>
+ [% END %]
[% END %]
</tr>
[% ELSE %]
<tr>
[% FOREACH text_field IN TABL.text_fields %]
[% IF ( text_field.select_field ) %]
+ <td>
+ <a class="btn btn-mini" onclick="return confirm(MSG_CONFIRM_DELETE);" href="/cgi-bin/koha/patroncards/image-manage.pl?op=delete&image_id=[% text_field.field_value %]"><icon class="icon-trash"></icon> Delete</a>
+ </td>
<td align="center"><input type="checkbox" name="action" value="[% text_field.field_value %]" /></td>
[% ELSIF ( text_field.field_value ) %]
<td>[% text_field.field_value %]</td>
[% END %]
[% END %]
</table>
- </fieldset>
- <fieldset class="action">
- <input type="hidden" name="op" value="delete" />
- <input type="button" id="delete" value="Delete" />
- <a id="canceldel" href="/cgi-bin/koha/patroncards/home.pl" class="cancel">Cancel</a>
+ <div class="action">
+ <input type="hidden" name="op" value="delete" />
+ <input class="btn btn-default" type="button" id="delete" value="Delete selected" />
+ </div>
+ [% IF ( DELETE_SUCCESSFULL ) %]
+ <div id="dialog" class="dialog message">
+ <h3>Image(s) successfully deleted</h3>
+ </div>
+ [% END %]
</fieldset>
</form>
[% ELSE %]
<div class="hint">
No images are currently available.
</div>
+ [% IF ( DELETE_SUCCESSFULL ) %]
+ <div id="dialog" class="dialog message">
+ <h3>Image(s) successfully deleted</h3>
+ </div>
+ [% END %]
</fieldset>
[% END %]
</div>
[%- CASE 'Profiles' -%]Profiles
[%- CASE 'batch' -%]batch
[%- CASE 'Batches' -%]Batches
+[%- CASE 'Actions' -%]Actions
[%- END -%]
[% END %]
[% INCLUDE 'doc-head-open.inc' %]
[% INCLUDE 'greybox.inc' %]
<script type="text/javascript">
//<![CDATA[
+ var MSG_CONFIRM_DELETE = _("Are you sure you want to delete this?");
function DeleteConfirm() {
var element_id = selected_layout("delete");
if (element_id>-1) {
[% IF ( table_loo.header_fields ) %]
<tr>
[% FOREACH header_field IN table_loo.header_fields %]
- <th>[% header_field.field_label %]</th>
+ [% SWITCH header_field.field_label -%]
+ [% CASE "Select" -%]
+ [% IF ( print ) %]<th>Select</th>[% END %]
+ [% CASE %]
+ <th>[% header_field.field_label %]</th>
+ [% END -%]
[% END %]
</tr>
[% ELSE %]
<tr>
[% FOREACH text_field IN table_loo.text_fields %]
[% IF ( text_field.select_field ) %]
- <td align="center"><input type="checkbox" name="action" value="[% text_field.field_value %]" /></td>
+ <td>
+ <a class="btn btn-mini" href="/cgi-bin/koha/patroncards/edit-[% card_element %].pl?op=edit&element_id=[% text_field.field_value %]"><icon class="icon-edit"></icon> Edit</a>
+ [% IF ( print ) %]<a class="btn btn-mini" href="#" onclick="GB_showCenter('Export single batch','/cgi-bin/koha/patroncards/print.pl?batch_id=[% text_field.field_value |url %]')"><icon class="icon-share"></icon> Export</a>[% END %]
+ <a class="btn btn-mini" onclick="return confirm(MSG_CONFIRM_DELETE);" href="/cgi-bin/koha/patroncards/manage.pl?op=delete&card_element=[% card_element %]&element_id=[% text_field.field_value %]"><icon class="icon-trash"></icon> Delete</a>
+ </td>
+ [% IF ( print ) %]<td align="center"><input type="checkbox" name="action" value="[% text_field.field_value %]" /></td>[% END %]
[% ELSIF ( text_field.field_value ) %]
<td>[% text_field.field_value %]</td>
[% ELSE %]
[% END %]
</table>
<fieldset class="action">
- <input type="button" id="edit" value="Edit" />
- <input type="button" id="delete" value="Delete" />
- [% IF ( print ) %]<input type="button" id="print" value="Export" />[% END %]
+ [% IF ( print ) %]<input class="btn btn-sm" type="button" id="print" value="Export selected batches" />[% END %]
</fieldset>
</form>
[% ELSE %]
</fieldset>
<fieldset class="action">
- <input type="button" class="submit" id="done" onclick="parent.parent.GB_hide();" value="Done" />
+ <input type="button" class="btn btn-default submit" id="done" onclick="parent.parent.GB_hide();" value="Done" />
</fieldset>
</form>
[% ELSE %]
<h3>
[% IF ( label_ids ) %]
- [% IF ( card_count == 1 ) %]Exporting [% card_count %] patroncard[% ELSE %]Exporting [% card_count %] patroncards[% END %]
+ [% IF ( card_count == 1 ) %]Exporting [% card_count %] patron card[% ELSE %]Exporting [% card_count %] patron cards[% END %]
[% ELSIF ( borrower_numbers ) %]
- [% IF ( borrower_count == 1 ) %]Exporting [% borrower_count %] patroncard[% ELSE %]Exporting [% borrower_count %] patroncards[% END %]
+ [% IF ( borrower_count == 1 ) %]Exporting [% borrower_count %] patron card[% ELSE %]Exporting [% borrower_count %] patron cards[% END %]
[% ELSE %]
[% IF ( multi_batch_count == 1 ) %][% multi_batch_count %] batch to export[% ELSE %][% multi_batch_count %] batches to export[% END %]
[% END %]
</ol>
</fieldset>
<fieldset class="action">
- <input type="submit" class="submit" value="Export" />
+ <input type="submit" class="btn btn-default submit" value="Export" />
<a href="#" class="cancel" id="done" onclick="parent.parent.GB_hide();">Cancel</a>
</fieldset>
</form>
my $duplicate_message = undef;
my $db_rows = {};
my $batch = undef;
-my $display_columns = [ {_card_number => {label => 'Card Number', link_field => 0}},
- {_summary => {label => 'Summary', link_field => 0}},
+my $display_columns = [ {_summary => {label => 'Summary', link_field => 0}},
{borrowernumber => {label => 'Borrower Number', link_field => 0}},
+ {_action => {label => 'Actions ', link_field => 0}},
{select => {label => 'Select', value => '_label_id'}},
];
my $op = $cgi->param('op') || 'new';
my $display_columns = { image => [ #{db column => {label => 'col label', is link? }},
{image_id => {label => 'ID', link_field => 0}},
{image_name => {label => 'Name', link_field => 0}},
+ {_delete => {label => 'Delete', link_field => 0}},
{select => {label => 'Select', value => 'image_id'}},
],
};
my $display_columns = { layout => [ # db column => {col label is link?
{layout_id => {label => 'Layout ID', link_field => 0}},
{layout_name => {label => 'Layout', link_field => 0}},
+ {_action => {label => 'Action', link_field => 0}},
#{layout_xml => {label => 'Layout XML', link_field => 0}},
{select => {label => 'Select', value => 'layout_id'}},
],
template => [ {template_id => {label => 'Template ID', link_field => 0}},
{template_code => {label => 'Template Name', link_field => 0}},
{template_desc => {label => 'Description', link_field => 0}},
+ {_action => {label => 'Action', link_field => 0}},
{select => {label => 'Select', value => 'template_id'}},
],
profile => [ {profile_id => {label => 'Profile ID', link_field => 0}},
{printer_name => {label => 'Printer Name', link_field => 0}},
{paper_bin => {label => 'Paper Bin', link_field => 0}},
{_template_code => {label => 'Template Name', link_field => 0}}, # this display column does not have a corrisponding db column in the profile table, hence the underscore
+ {_action => {label => 'Action', link_field => 0}},
{select => {label => 'Select', value => 'profile_id'}},
],
batch => [ {batch_id => {label => 'Batch ID', link_field => 0}},
{_item_count => {label => 'Item Count', link_field => 0}},
+ {_action => {label => 'Actions', link_field => 0}},
{select => {label => 'Select', value => 'batch_id'}},
],
};