From 5e1ef04b0452060655c0deccad8d404f04fed2ee Mon Sep 17 00:00:00 2001 From: Aleisha Date: Thu, 10 Mar 2016 23:59:18 +0000 Subject: [PATCH] Bug 16049: Moving patron card batches actions into a drop down menu This patch - changes table to datatable - renames 'Actions' column to nothing ( ) - moves actions into drop down menus Moving the Select column to the start proved to be more difficult than expected so if anyone else knows a smart way to do that, feel free to add to this patch To test: 1) Go to Tools -> Patron Card Creator -> Manage card batches 2) Confirm that all actions 'Edit', 'Export', 'Delete') have been moved into a drop down menu and each still works as expected 3) Confirm you can sort on Batch ID and Patron Count but not the other two columns Sponsored-by: Catalyst IT --- .../prog/en/modules/patroncards/manage.tt | 27 +++++++++++++++++--- patroncards/manage.pl | 2 +- 2 files changed, 24 insertions(+), 5 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/manage.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/manage.tt index 331eede..805fa8b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/manage.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/manage.tt @@ -24,6 +24,8 @@ Koha › Tools › Patron card creator › [% PROCESS translate_card_element element=card_element_title %] [% INCLUDE 'doc-head-close.inc' %] [% INCLUDE 'greybox.inc' %] + + [% INCLUDE 'datatables.inc' %] @@ -182,7 +192,8 @@ [% IF ( table_loop ) %]

Currently available [% PROCESS translate_card_element element=card_element_title FILTER lower %]

- +
+ [% FOREACH table_loo IN table_loop %] [% IF ( table_loo.header_fields ) %] @@ -195,14 +206,22 @@ [% END -%] [% END %] + + [% ELSE %] [% FOREACH text_field IN table_loo.text_fields %] [% IF ( text_field.select_field ) %] [% IF ( print ) %][% END %] [% ELSIF ( text_field.field_value ) %] diff --git a/patroncards/manage.pl b/patroncards/manage.pl index 9190cd3..e1c4915 100755 --- a/patroncards/manage.pl +++ b/patroncards/manage.pl @@ -71,7 +71,7 @@ my $display_columns = { layout => [ # db column => {col label ], batch => [ {batch_id => {label => 'Batch ID', link_field => 0}}, {_item_count => {label => 'Patron Count', link_field => 0}}, - {_action => {label => 'Actions', link_field => 0}}, + {_action => {label => ' ', link_field => 0}}, {select => {label => 'Select', value => 'batch_id'}}, ], }; -- 1.7.10.4
- Edit - [% IF ( print ) %] Export[% END %] - Delete +