From 08a897547f8271ee0387be39554874631fdd5f17 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Mon, 15 Aug 2022 16:49:03 +0100 Subject: [PATCH] Bug 31028: Tie OPAC display to logged in state This is an alternative to th previous patch.. we can't easily redirect back to the right location after login from our modal. It would be preferable to display the button and prompt a login if we don't have a valid session.. but that's not trivial using the API's and our login flows at the moment. --- .../opac-tmpl/bootstrap/en/includes/opac-detail-sidebar.inc | 2 +- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-detail-sidebar.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-detail-sidebar.inc index 644a578671..9eaca4044c 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-detail-sidebar.inc +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-detail-sidebar.inc @@ -42,7 +42,7 @@
  • Suggest for purchase
  • [% END %] - [% IF Koha.Preference('OpacCatalogConcerns') %] + [% IF Koha.Preference('OpacCatalogConcerns') && loggedinusername %]
  • Report a concern
  • [% END %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt index 249d72c069..03d07cdd9b 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt @@ -1422,12 +1422,12 @@ -[% IF Koha.Preference('OpacCatalogConcerns') %] +[% IF Koha.Preference('OpacCatalogConcerns') && loggedinusername %] [% INCLUDE 'modals/catalog_concern.inc' %] [% END %] [% BLOCK jsinclude %] - [% IF Koha.Preference('OpacCatalogConcerns') %] + [% IF Koha.Preference('OpacCatalogConcerns') && loggedinusername %] [% Asset.js("js/modals/catalog_concern.js") | $raw %] [% END %] [% INCLUDE 'datatables.inc' %] -- 2.20.1