Bugzilla – Attachment 48982 Details for
Bug 16049
Moving patron card batches actions into a drop down menu
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16049: Moving patron card batches actions into a drop down menu
Bug-16049-Moving-patron-card-batches-actions-into-.patch (text/plain), 6.58 KB, created by
Aleisha Amohia
on 2016-03-11 00:06:23 UTC
(
hide
)
Description:
Bug 16049: Moving patron card batches actions into a drop down menu
Filename:
MIME Type:
Creator:
Aleisha Amohia
Created:
2016-03-11 00:06:23 UTC
Size:
6.58 KB
patch
obsolete
>From 5e1ef04b0452060655c0deccad8d404f04fed2ee Mon Sep 17 00:00:00 2001 >From: Aleisha <aleishaamohia@hotmail.com> >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 @@ > <title>Koha › Tools › Patron card creator › [% PROCESS translate_card_element element=card_element_title %]</title> > [% INCLUDE 'doc-head-close.inc' %] > [% INCLUDE 'greybox.inc' %] >+ <link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" /> >+ [% INCLUDE 'datatables.inc' %] > <script type="text/javascript"> > //<![CDATA[ > var MSG_CONFIRM_DELETE = _("Are you sure you want to delete this?"); >@@ -157,6 +159,14 @@ > XportPatronlist(); > return false; > }); >+ >+ $("#patroncardbatches").dataTable($.extend(true, {}, dataTablesDefaults, { >+ "aoColumnDefs": [ >+ { "aTargets": [ -1, -2 ], "bSortable": false, "bSearchable": false }, >+ ], >+ "iDisplayLength": 10, >+ "sPaginationType": "four_button" >+ })); > }); > //]]> > </script> >@@ -182,7 +192,8 @@ > [% IF ( table_loop ) %] > <form name="layouts" action="/cgi-bin/koha/manage.pl?card_element=[% card_element %]"> > <h2>Currently available [% PROCESS translate_card_element element=card_element_title FILTER lower %]</h2> >- <table> >+ <table id="patroncardbatches"> >+ <thead> > [% FOREACH table_loo IN table_loop %] > [% IF ( table_loo.header_fields ) %] > <tr> >@@ -195,14 +206,22 @@ > [% END -%] > [% END %] > </tr> >+ </thead> >+ <tbody> > [% ELSE %] > <tr> > [% FOREACH text_field IN table_loo.text_fields %] > [% IF ( text_field.select_field ) %] > <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="fa fa-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 %]', 400, 800)"><icon class="fa fa-share-square-o"></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="fa fa-trash"></icon> Delete</a> >+ <div class="dropdown"> >+ <a class="btn btn-mini dropdown-toggle" id="patroncardbatchactions[% text_field.field_value %]" role="button" data-toggle="dropdown" href="#"> >+ Actions <b class="caret"></b></a> >+ <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="patroncardbatchactions[% text_field.field_value %]"> >+ <li><a href="/cgi-bin/koha/patroncards/edit-[% card_element %].pl?op=edit&element_id=[% text_field.field_value %]"><i class="fa fa-edit"></i> Edit</a></li> >+ [% IF ( print ) %]<li><a href="#" onclick="GB_showCenter('Export single batch','/cgi-bin/koha/patroncards/print.pl?batch_id=[% text_field.field_value |url %]', 400, 800)"><i class="fa fa-upload"></i> Export</a></li>[% END %] >+ <li><a 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 %]"><i class="fa fa-trash"></i> Delete</a></li> >+ </ul> >+ </div> > </td> > [% IF ( print ) %]<td align="center"><input type="checkbox" name="action" value="[% text_field.field_value %]" /></td>[% 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
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 16049
:
48981
| 48982