Bug 11663: fix display of holding tab in Bootstap OPAC when opacbookbag syspref is disabled

Bootstap theme opac holding tab is improperly displayed when opacbookbag
syspref is disabled, and virtualshelf is enabled. This is due to the
fact that in this situation basket.js is loaded (for virtual shelves),
but some JS variables are not defined in template since opacbookbag is
disabled.

To reproduce this bug:

- Choose bootstrap OPAC theme
- Enable virtualsheves syspref
- Disable opacbookbag syspref
- Open a biblio record in OPAC detail page
- You will observe that items holding tabs are not displayed as tabs but
  as a bulleted list

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes QA script and all tests.
Confirmed display problem exists without the patch and is solved by it.
Ideally we would avoid having the cart messages in the template when
the feature is deactivated, but this is ok for now.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
This commit is contained in:
Frédéric Demians 2014-02-01 09:49:38 +01:00 committed by Galen Charlton
parent b94555719f
commit e3c203aebb

View file

@ -108,7 +108,7 @@
//<![CDATA[
var MSG_CONFIRM_AGAIN = _("Warning: Cannot be undone. Please confirm once again")
var MSG_DELETE_SEARCH_HISTORY = _("Are you sure you want to delete your search history?");
[% IF Koha.Preference( 'opacbookbag' ) == 1 %]
[% IF Koha.Preference( 'opacbookbag' ) == 1 or Koha.Preference( 'virtualshelves' ) == 1 %]
var MSG_BASKET_EMPTY = _("Your cart is currently empty");
var MSG_RECORD_IN_BASKET = _("The item is already in your cart");
var MSG_RECORD_ADDED = _("The item has been added to your cart");
@ -122,10 +122,7 @@
var MSG_ITEM_IN_CART = _("In your cart");
var MSG_IN_YOUR_CART = _("Items in your cart: ");
var MSG_ITEM_NOT_IN_CART = _("Add to your cart");
[% ELSE %]
[% IF Koha.Preference( 'virtualshelves' ) == 1 %]
var MSG_NO_RECORD_SELECTED = _("No item was selected");
[% END %]
var MSG_NO_RECORD_SELECTED = _("No item was selected");
[% END %]
[% IF ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'TagsEnabled' ) == 1 ) %]
var MSG_TAGS_DISABLED = _("Sorry, tags are not enabled on this system.");