Bug 19171: Attempt to make "no holds possible" messages less confusing
authorKatrin Fischer <katrin.fischer.83@web.de>
Sun, 22 Apr 2018 22:00:17 +0000 (22:00 +0000)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 4 May 2018 12:17:10 +0000 (09:17 -0300)
At the moment, when no holds are possible, the OPAC reads something
like:

Sorry, none of these items can be placed on hold.
No items available.

This is confusing to the patrons, because the records have items,
but they are not showing. The record also may have available items,
they are just not permitted to place holds on them.

Changes:
- Only display the first message, when somoene tried unsuccessfully
  to place holds on multiple records.
- Change first message to: Sorry, none of these titles can be placed on hold.
- Change the second message to read:
  No items available to be placed on hold.
- Remove <strong> around Sorry for better translatability.

To test:
- Try to place a hold on single record, where no hold is possible.
- Try to place a hold on a single record, where a hold is possible.
- Try to place holds on multiple records where no hold is possible.
- Try to place holds on multiple records where at least one hold
  is possible.

  Verify the screen messages make sense in all cases.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Fixed stray </strong> during signoff.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
For consistency with staff, I renamed multi_holds to multi_hold.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt
opac/opac-reserve.pl

index 0f2f4eb..e35c240 100644 (file)
@@ -22,7 +22,7 @@
         <div id="holds">
             [% IF ( message ) %]
                 <div id="holdmessages" class="alert">
-                    <p><strong>Sorry</strong>, you cannot place holds.</strong></p>
+                    <p>Sorry, you cannot place holds.</p>
                     <ul>
                         [% IF ( GNA ) %]
                             <li id="gna">
 
                     [% ELSE %]
 
-                        [% IF ( none_available ) %]
+                        [% IF ( none_available && multi_hold ) %]
                             <div id="none_available" class="alert">
-                                <strong>Sorry</strong>, none of these items can be placed on hold.
+                                Sorry, none of these titles can be placed on hold.
                             </div>
                         [% END %]
                 </div>
                                                 <div class="alert">You have already requested this title.</div>
                                             [% ELSE %]
                                                 [% UNLESS ( bibitemloo.bib_available ) %]
-                                                    <div class="alert">No available items.</div>
+                                                    <div class="alert">There are no items that can be placed on hold.</div>
                                                 [% ELSE %]
                                                     [% IF ( bibitemloo.already_patron_possession ) %]
                                                         <div class="alert">This title cannot be requested because it's already in your possession.</div>
index 2be6991..4a0dbb9 100755 (executable)
@@ -623,6 +623,10 @@ if ( $numBibsAvailable == 0 || $anyholdable == 0) {
     $template->param( none_available => 1 );
 }
 
+if (scalar @biblionumbers > 1) {
+    $template->param( multi_hold => 1);
+}
+
 my $show_notes=C4::Context->preference('OpacHoldNotes');
 $template->param(OpacHoldNotes=>$show_notes);