From bd843310d6d1c41a0ac02b871b174c24c8b9efae Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Wed, 30 Jan 2013 12:25:21 -0500 Subject: [PATCH] Bug 9617 - Replace YUI menu on catalog pages with Bootstrap Content-Type: text/plain; charset="utf-8" This patch converts the toolbar include file used by catalog detail pages (detail.pl, MARCdetail.pl, etc.) replacing YUI button and menu code with Bootstrap. Minor change to staff client CSS fixes issue with language footer. Minor change to doc-head-close.inc corrects error in logic for handling cart and lists js discovered in testing. To test, view any page which uses cat-toolbar.inc. Buttons and menus should look correct and work correctly. Functions to test include: New record New item New subscription New child record Edit record Edit items Edit items in a batch Delete items in a batch Attach item Edit as new (duplicate) Replace record via Z39.50 Delete record Delete all items Save (various formats) Add to cart Add to list Print Place hold (including with search-to-hold active). Testing should be done by users with varying permissions including with and without: CAN_user_serials_create_subscription CAN_user_editcatalogue_edit_catalogue CAN_user_editcatalogue_edit_items CAN_user_tools_items_batchmod CAN_user_tools_items_batchdel --- .../intranet-tmpl/prog/en/css/staff-global.css | 2 +- .../intranet-tmpl/prog/en/includes/cat-toolbar.inc | 284 +++++++++----------- .../prog/en/includes/doc-head-close.inc | 9 +- 3 files changed, 129 insertions(+), 166 deletions(-) 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 e95c60f..aaf01ee 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css +++ b/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css @@ -48,7 +48,7 @@ a.popup { body { text-align : left; - padding:0 0 2.5em 0; + padding:0 0 4em 0; font-family: arial, verdana, helvetica, sans-serif; } diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc index 6936532..2dde5ad 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc @@ -1,5 +1,3 @@ -
- + +
- YAHOO.util.Event.onContentReady("cattoolbar", function () { - // Menu for new record, new item, new subscription - var newmenu = [ - [% IF CAN_user_editcatalogue_edit_catalogue %] - {text: _("New record"), url: "/cgi-bin/koha/cataloguing/addbiblio.pl" }, +
+ +[% IF ( CAN_user_editcatalogue_edit_catalogue || CAN_user_editcatalogue_edit_items || +CAN_user_serials_create_subscription ) %] +
+ + +
+[% END %] - var addtomenu = [ - { text: _("Cart"), onclick: { fn: addToCart } }, - { text: _("List"), onclick: { fn: addToShelf } } - ]; +
+ +
+ + + +[% IF ( virtualshelves && intranetbookbag ) %] +
+ + +
+[% ELSIF ( virtualshelves ) %] + +[% ELSIF ( intranetbookbag ) %] + +[% END %] + + + +[% IF ( CAN_user_reserveforothers ) %] + [% UNLESS ( norequests ) %] + [% IF ( holdfor ) %] + + [% ELSE %] + + [% END %] + [% END %] +[% END %] +
diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-close.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-close.inc index 6fcba72..a883def 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-close.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-close.inc @@ -43,9 +43,10 @@ //]]> [% END %] +[% IF ( virtualshelves || intranetbookbag ) %] - [% IF ( virtualshelves || intranetbookbag ) %] - - [% END %] + +[% END %] [% IF LocalCoverImages %]