From 92ac946f0f67e6f9504ee8b5175ea545acd05b5a Mon Sep 17 00:00:00 2001 From: Alex Buckley Date: Wed, 8 Aug 2018 17:15:02 +1200 Subject: [PATCH] Bug 21174 - Implemented syspref to enable the loading of cart popup on one click Sponsored-By: Toi Ohomai Insitute of Technology, New Zealand --- .../prog/en/modules/admin/preferences/opac.pref | 6 ++++ .../opac-tmpl/bootstrap/en/includes/masthead.inc | 34 +++++++++++++++------- .../bootstrap/en/includes/opac-bottom.inc | 1 - koha-tmpl/opac-tmpl/bootstrap/js/basket.js | 22 ++++++++++---- 4 files changed, 45 insertions(+), 18 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref index f46dda3..74f83b6 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref @@ -416,6 +416,12 @@ OPAC: no: "Don't allow" - patrons to store items in a temporary "Cart" on the OPAC. - + - pref: EnableOneClickToOpenCartPopup + choices: + yes: Enable + no: "Don't enable" + - Enable to load the cart popup immediately upon clicking on the OPAC cart icon. + - - pref: OpacTopissue choices: yes: Allow diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc index 71151ec..3e7c43f 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc @@ -16,20 +16,32 @@ [% IF ( Koha.Preference( 'opacbookbag' ) == 1 ) %] -
Your cart is empty.
+ [% IF ( Koha.Preference('EnableOneClickToOpenCartPopup') == 1 ) %] +
Your cart is empty.
+ [% ELSE %] +
Your cart is empty.
+ [% END %] [% END %]