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 <cbrannon@debian.localdomain>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This commit is contained in:
Kyle M Hall 2014-11-25 10:16:47 -05:00 committed by Tomas Cohen Arazi
parent fcaa6f35c0
commit 295fb70f62
2 changed files with 11 additions and 7 deletions

View File

@ -173,12 +173,18 @@
</li>
[% END %]
[% IF showholds || showpriority %]
[% SET OPACShowHoldQueueDetails = Koha.Preference('OPACShowHoldQueueDetails') %]
[% IF OPACShowHoldQueueDetails == 'holds_priority' || OPACShowHoldQueueDetails == 'priority' %]
<li class="priority">
<span class="label">Holds and priority: </span>
[% IF showpriority %] [% bibitemloo.rank %] [% END %]
[% IF showholds && showpriority %] out of [% END %]
[% IF showholds %] [% bibitemloo.reservecount %] [% END %]
<span class="label">Your priority: </span>
[% bibitemloo.rank %]
</li>
[% END %]
[% IF OPACShowHoldQueueDetails == 'holds_priority' || OPACShowHoldQueueDetails == 'holds' %]
<li class="holds-count">
<span class="label">Number of holds: </span>
[% bibitemloo.reservecount %]
</li>
[% END %]

View File

@ -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' ) &&