From 295fb70f62069c0b1fbed2d9bbdf2650f58e488c Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Tue, 25 Nov 2014 10:16:47 -0500 Subject: [PATCH] Bug 13335 - Holds and priority display via OPACShowHoldQueueDetails confusing No matter what the selection of OPACShowHoldQueueDetails is, if it is enabled it displays a line "Holds and priority:" even if you've opted to hide one of those! Test Plan: 1) Apply this patch 2) Test each setting of OPACShowHoldQueueDetails 3) Ensure each setting displays the correct fields ( or lack thereof ) Signed-off-by: Christopher Brannon Signed-off-by: Jonathan Druart Signed-off-by: Tomas Cohen Arazi --- .../bootstrap/en/modules/opac-reserve.tt | 16 +++++++++++----- opac/opac-reserve.pl | 2 -- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt index 6558e6eaf4..a0442be32e 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt @@ -173,12 +173,18 @@ [% END %] - [% IF showholds || showpriority %] + [% SET OPACShowHoldQueueDetails = Koha.Preference('OPACShowHoldQueueDetails') %] + [% IF OPACShowHoldQueueDetails == 'holds_priority' || OPACShowHoldQueueDetails == 'priority' %]
  • - Holds and priority: - [% IF showpriority %] [% bibitemloo.rank %] [% END %] - [% IF showholds && showpriority %] out of [% END %] - [% IF showholds %] [% bibitemloo.reservecount %] [% END %] + Your priority: + [% bibitemloo.rank %] +
  • + [% END %] + + [% IF OPACShowHoldQueueDetails == 'holds_priority' || OPACShowHoldQueueDetails == 'holds' %] +
  • + Number of holds: + [% bibitemloo.reservecount %]
  • [% END %] diff --git a/opac/opac-reserve.pl b/opac/opac-reserve.pl index 6c381f36c9..b7143687e1 100755 --- a/opac/opac-reserve.pl +++ b/opac/opac-reserve.pl @@ -573,8 +573,6 @@ $template->param(OpacHoldNotes=>$show_notes); # display infos $template->param(bibitemloop => $biblioLoop); -$template->param( showholds=>$show_holds_count); -$template->param( showpriority=>$show_priority); # can set reserve date in future if ( C4::Context->preference( 'AllowHoldDateInFuture' ) && -- 2.39.5