From 141617700ed74046e9139651a43239eb63935184 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 Signed-off-by: Kyle M Hall (cherry picked from commit de1f144aa32b732e34b399afce3da3e9862e1f1a) Signed-off-by: Fridolin Somers --- .../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 5cc131f5df..0107dd56ac 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt @@ -40,7 +40,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 %]
@@ -48,6 +48,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) %] @@ -69,13 +78,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

@@ -299,7 +310,7 @@ [% END %] - [% ELSIF NOT noitems # /UNLESS patron %] + [% ELSIF NOT ( noitems || nobiblio ) # /UNLESS patron %] [% IF ( checked_previously && !multi_hold ) %]
@@ -951,7 +962,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 %]
@@ -1325,7 +1336,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 2f57381924..14d8a6a03c 100755 --- a/reserve/request.pl +++ b/reserve/request.pl @@ -301,8 +301,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