From 100a1220c0e0549501c399da2d8f2ef9b58e3f0e Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Wed, 17 Jul 2013 15:51:01 -0400 Subject: [PATCH] Bug 10565 [Follow-up] Add a "Patron List" feature for storing and manipulating collections of patrons Content-Type: text/plain; charset="utf-8" This patch makes the following changes: On the list add/edit page: - Improvements to breadcrumbs and titles on the add/edit page. - Removal of custom validation JavaScript in favor of built-in validation plugin. On the list view page: - Corrected title on list page: Showing list name instead of "New list" - Added "select all" and "clear all" to a toolbar like on the biblio list page. Moved the "remove selected" button to this toolbar like it is on the biblio list page. - Added more standard DataTables configuration with default sort, correctly ignored columns, and pager count options. - Display patron names as "surname, firstname." - Improve JavaScript for removing entries from the list of patrons to add (to avoid "javascript:" pseudo-protocol). - Move "add patrons" controls so that they are only shown after patrons have been added. - Add toolbar to patron list view page with button for "Edit list" and "Batch modify." The "Batch modify" button takes you directly to a batch modification operation on your list. - Added zipcode to displayed information. - Added message to be displayed when there are no items on the list (instead of showing empty table). On the list of lists page: - Added more standard DataTables configuration with default sort, correctly ignored columns, and pager count options. - Wrapped "new list" button in standard toolbar div. - Show message instead of empty table if there are no lists. - Style in-table buttons with "btn-mini" for more compact look. On scripts: - Changed "authnotrequired" from 1 to 0, added 'borrowers' permission requirement. --- .../prog/en/modules/patron_lists/add-modify.tt | 38 ++--- .../prog/en/modules/patron_lists/list.tt | 168 ++++++++++++-------- .../prog/en/modules/patron_lists/lists.tt | 89 ++++++----- patron_lists/add-modify.pl | 3 +- patron_lists/delete.pl | 3 +- patron_lists/list.pl | 3 +- patron_lists/lists.pl | 3 +- 7 files changed, 173 insertions(+), 134 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/add-modify.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/add-modify.tt index 5ec0cd1..acad328 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/add-modify.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/add-modify.tt @@ -1,43 +1,27 @@ [% INCLUDE 'doc-head-open.inc' %] -Koha › Patron lists › New list +Koha › Patron lists › [% IF ( list.name ) %] Edit patron list [% ELSE %] New patron list [% END %] [% INCLUDE 'doc-head-close.inc' %] - [% INCLUDE 'header.inc' %] [% INCLUDE 'cat-search.inc' %] - +
-

New patron list

-
+
- - Create a new patron list - + [% IF ( list.name ) %] Edit patron list [% ELSE %] New patron list [% END %]
  1. - - + + Required
  2. @@ -47,10 +31,12 @@ function CheckForm() {
- - - Cancel +
+ + + Cancel +
-
+ [% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/list.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/list.tt index ebcd71f..f008cc1 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/list.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/list.tt @@ -1,25 +1,31 @@ [% USE KohaDates %] [% INCLUDE 'doc-head-open.inc' %] -Koha › Patron lists › New list +Koha › Patron lists › [% list.name %] [% INCLUDE 'doc-head-close.inc' %] [% INCLUDE 'datatables-strings.inc' %] + @@ -55,13 +70,23 @@ function RemovePatron( cardnumber ) { [% INCLUDE 'header.inc' %] [% INCLUDE 'cat-search.inc' %] - +

[% list.name %]

-
+
+ + +
+ + +
Add patrons @@ -72,61 +97,72 @@ function RemovePatron( cardnumber ) {
Patrons to be added
+
+ + Cancel +
-
-

- - Cancel -

- - - - - - - - - - - - - - - - - - [% FOREACH p IN list.patron_list_patrons %] + [% UNLESS ( list.patron_list_patrons ) %] +
+

There are no patrons on this list.

+
+ [% ELSE %] +
+
+ | + +
+ +
+
+
+ +
CardFirstnameSurnameAddressCategoryLibraryExpires onCirc notes
+ - - - - - - - - - + + + + + + + + + - [% END %] - -
- - [% p.borrowernumber.cardnumber %] - - [% p.borrowernumber.firstname %][% p.borrowernumber.surname %] - [% p.borrowernumber.address %] - [% p.borrowernumber.address2 %] - [% p.borrowernumber.city %] - [% p.borrowernumber.state %] - [% p.borrowernumber.country %] - [% p.borrowernumber.categorycode.description %] ([% p.borrowernumber.categorycode.categorycode %])[% p.borrowernumber.branchcode.branchname %][% p.borrowernumber.dateexpiry | $KohaDates %][% p.borrowernumber.borrowernotes %] CardLast nameFirst nameAddressCategoryLibraryExpires onCirc notes
- - - - Cancel + + + + [% FOREACH p IN list.patron_list_patrons %] + + + + + [% p.borrowernumber.cardnumber %] + + + [% p.borrowernumber.surname %] + [% p.borrowernumber.firstname %] + + [% p.borrowernumber.address %] + [% p.borrowernumber.address2 %] + [% p.borrowernumber.city %] + [% p.borrowernumber.state %] + [% p.borrowernumber.zipcode %] + [% p.borrowernumber.country %] + + [% p.borrowernumber.categorycode.description %] ([% p.borrowernumber.categorycode.categorycode %]) + [% p.borrowernumber.branchcode.branchname %] + [% p.borrowernumber.dateexpiry | $KohaDates %] + [% p.borrowernumber.borrowernotes %] + + [% END %] + + + [% END %]
-
+ [% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/lists.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/lists.tt index 972f36d..2a55ffc 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/lists.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/lists.tt @@ -10,7 +10,13 @@