Bug 13335 - Holds and priority display via OPACShowHoldQueueDetails confusing
authorKyle M Hall <kyle@bywatersolutions.com>
Tue, 25 Nov 2014 15:16:47 +0000 (10:16 -0500)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Thu, 12 Feb 2015 18:20:59 +0000 (15:20 -0300)
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>
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt
opac/opac-reserve.pl

index 6558e6e..a0442be 100644 (file)
                                                         </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 %]
 
index 6c381f3..b714368 100755 (executable)
@@ -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' ) &&