From 76b6bd8eb9dae02d7885c4b794bd527b25ed9665 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Fri, 30 Jul 2021 14:39:39 +0000 Subject: [PATCH] Bug 28779: (QA follow-up) More specific message and soem cleanup Signed-off-by: Nick Clemens Signed-off-by: Petro Vashchuk Signed-off-by: Katrin Fischer Signed-off-by: Jonathan Druart --- .../prog/en/modules/reserve/request.tt | 29 +++++++++++++------ reserve/request.pl | 4 +-- 2 files changed, 22 insertions(+), 11 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt index 5a8545c612..513b903f5a 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt @@ -64,7 +64,7 @@
- [% IF ( multi_hold ) # No sidebar menu when placing multiple holds %] + [% IF ( multi_hold || nobiblio ) # No sidebar menu when placing multiple holds or biblio not found %]
[% ELSE %]
@@ -72,6 +72,15 @@
+ [% IF ( nobiblio ) %] +
+ [%IF (multi_hold) %] + Cannot place hold: one or more records cannot be found. + [% ELSE %] + Cannot place hold: this record cannot be found. + [% END %] +
+ [% END %] [% IF ( noitems ) %]
[%IF (multi_hold) %] @@ -93,13 +102,15 @@
[% END %] - [% UNLESS ( multi_hold ) %] -

Place a hold on [% INCLUDE 'biblio-title.inc' link = 1 %]

- [% ELSE %] -

Confirm holds

+ [% UNLESS ( nobiblio ) %] + [% UNLESS ( multi_hold ) %] +

Place a hold on [% INCLUDE 'biblio-title.inc' link = 1 %]

+ [% ELSE %] +

Confirm holds

+ [% END %] [% END %] - [% UNLESS club OR patron OR patron.borrowernumber OR noitems %] + [% UNLESS club OR patron OR patron.borrowernumber OR noitems OR nobiblio %] [% IF ( messageborrower ) %]

Patron not found

@@ -323,7 +334,7 @@ [% END %] - [% ELSIF NOT noitems # /UNLESS patron %] + [% ELSIF NOT ( noitems || nobiblio ) # /UNLESS patron %] [% IF ( checked_previously && !multi_hold ) %]
@@ -1004,7 +1015,7 @@
- [% IF ( multi_hold ) # No sidebar menu when placing multiple holds %] + [% IF ( multi_hold || nobiblio ) # No sidebar menu when placing multiple holds or biblio not found %]
[% ELSE %]
@@ -1537,7 +1548,7 @@ return false; }); - [% UNLESS ( patron || patron.borrowernumber || borrowers || noitems ) %] + [% UNLESS ( patron || patron.borrowernumber || borrowers || noitems || nobiblio ) %] [% IF ( PatronAutoComplete ) %] $( "#patron" ).autocomplete({ source: "/cgi-bin/koha/circ/ysearch.pl", diff --git a/reserve/request.pl b/reserve/request.pl index 4757ec091f..2dab6e37d0 100755 --- a/reserve/request.pl +++ b/reserve/request.pl @@ -309,8 +309,8 @@ foreach my $biblionumber (@biblionumbers) { my $biblio = Koha::Biblios->find( $biblionumber ); unless ($biblio) { $biblioloopiter{noitems} = 1; - $template->param('noitems' => 1); - next; + $template->param('nobiblio' => 1); + last; } my $force_hold_level; -- 2.39.5