From 1c3e42fcf56176a515313ecbc781b61b795f0b26 Mon Sep 17 00:00:00 2001 From: Katrin Fischer Date: Sun, 22 Apr 2018 22:00:17 +0000 Subject: [PATCH] Bug 19171: Attempt to make "no holds possible" messages less confusing 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 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. https://bugs.koha-community.org/show_bug.cgi?id=14716 Fixed stray during signoff. Signed-off-by: Owen Leonard --- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt | 8 ++++---- opac/opac-reserve.pl | 4 ++++ 2 files changed, 8 insertions(+), 4 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 0f2f4eb..4d7aa9d 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt @@ -22,7 +22,7 @@
[% IF ( message ) %]
-

Sorry, you cannot place holds.

+

Sorry, you cannot place holds.

    [% IF ( GNA ) %]
  • @@ -106,9 +106,9 @@ [% ELSE %] - [% IF ( none_available ) %] + [% IF ( none_available && multi_holds ) %]
    - Sorry, none of these items can be placed on hold. + Sorry, none of these titles can be placed on hold.
    [% END %]
@@ -174,7 +174,7 @@
You have already requested this title.
[% ELSE %] [% UNLESS ( bibitemloo.bib_available ) %] -
No available items.
+
There are no items that can be placed on hold.
[% ELSE %] [% IF ( bibitemloo.already_patron_possession ) %]
This title cannot be requested because it's already in your possession.
diff --git a/opac/opac-reserve.pl b/opac/opac-reserve.pl index 2be6991..7f71638 100755 --- a/opac/opac-reserve.pl +++ b/opac/opac-reserve.pl @@ -623,6 +623,10 @@ if ( $numBibsAvailable == 0 || $anyholdable == 0) { $template->param( none_available => 1 ); } +if (scalar @biblionumbers > 1) { + $template->param( multi_holds => 1); +} + my $show_notes=C4::Context->preference('OpacHoldNotes'); $template->param(OpacHoldNotes=>$show_notes); -- 2.1.4