From 9aa90ac7c303cb1c1da01e2e8c3a5c08f2c6c4f5 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Thu, 30 Oct 2014 12:42:07 -0400 Subject: [PATCH] Bug 8836 [Template follow-up] Resurrect Rotating Collections This follow-up makes drastic changes to the templates in order to bring them into compliance with established patterns and markup guidelines. Only minor changes are made to perl scripts. Changes: - Add a toolbar include for displaying new, edit, transfer, and delete buttons. - Improve title and breadcrumbs with collection titles and better specificity. - Correct page structure which was inconsistent with the markup of similarly-structured pages. - Correct styling of error and informational messages. - Added detailed error messages for a couple of conditions which were not defined in the template. - Add link to the detail page of titles which are in a collection using the view defined in the IntranetBiblioDefaultView preference. - Add a link to remove an item from a collection directly without having to scan the barcode. - Add client-side validation to collection creation form. - In RotatingCollections.pm, add biblionumber to the list of columns returned by GetItemsInCollection. - In rotating_collections/*.pl, remove obsolete declaration of system preference variables. To test, perform all the operations associated with Rotating Collections: - Add a new collection - Edit an existing collection - Add items to a collection - Remove items from a collection (via barcode and link) - Test the behavior of all new toolbar buttons - Verify that titles and breadcrumbs look correct and links work correctly. Signed-off-by: Brendan Gallagher --- C4/RotatingCollections.pm | 1 + .../intranet-tmpl/prog/en/css/staff-global.css | 1 + .../en/includes/rotating-collections-toolbar.inc | 17 +++ .../en/modules/rotating_collections/addItems.tt | 147 ++++++++++---------- .../rotating_collections/editCollections.tt | 138 +++++++++--------- .../rotating_collections/rotatingCollections.tt | 34 +++-- .../rotating_collections/transferCollection.tt | 68 +++++---- .../prog/en/modules/tools/tools-home.tt | 2 +- rotating_collections/addItems.pl | 5 - rotating_collections/editCollections.pl | 7 - rotating_collections/rotatingCollections.pl | 5 - rotating_collections/transferCollection.pl | 5 - 12 files changed, 222 insertions(+), 208 deletions(-) create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/rotating-collections-toolbar.inc diff --git a/C4/RotatingCollections.pm b/C4/RotatingCollections.pm index 12d835d..b6152a8 100644 --- a/C4/RotatingCollections.pm +++ b/C4/RotatingCollections.pm @@ -247,6 +247,7 @@ sub GetItemsInCollection { my $sth = $dbh->prepare( "SELECT biblio.title, + biblio.biblionumber, items.itemcallnumber, items.barcode FROM collections, collections_tracking, items, biblio diff --git a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css b/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css index 0f67416..defc5f7 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css +++ b/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css @@ -732,6 +732,7 @@ fieldset.rows fieldset.action { padding : 1em; } +fieldset.brief label.inline, fieldset.rows label.inline { display : inline; float : none; diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/rotating-collections-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/rotating-collections-toolbar.inc new file mode 100644 index 0000000..321d179 --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/rotating-collections-toolbar.inc @@ -0,0 +1,17 @@ +
+ + + [% IF ( colId ) %] +
+ Transfer +
+
+ Edit +
+
+ Delete +
+ [% END %] +
\ No newline at end of file diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/rotating_collections/addItems.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/rotating_collections/addItems.tt index fef190c..6e9e725 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/rotating_collections/addItems.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/rotating_collections/addItems.tt @@ -1,5 +1,5 @@ [% INCLUDE 'doc-head-open.inc' %] -Koha › Tools › Rotating collections › Add/Remove items +Koha › Tools › Rotating collections › Collection [% colTitle %] ’ Add or remove items [% INCLUDE 'doc-head-close.inc' %]