Bug 40585: (follow-up) Display error if no records were found
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit b9bf3609d1)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This commit is contained in:
parent
8198f36473
commit
5b92e3ba7f
|
|
@ -18,10 +18,11 @@
|
|||
<body id="lists_addbybiblionumber" class="lists">
|
||||
<div class="container-fluid">
|
||||
[% UNLESS (authorized) %]
|
||||
<h1>Error adding to list</h1>
|
||||
<div class="alert alert-warning">
|
||||
<h1>Error adding to list</h1>
|
||||
[% IF (errcode==1) %]<p>Could not create a new list. Please check the name.</p>[% END %]
|
||||
[% IF (errcode==2) %]<p>Sorry, you do not have permission to add items to this list.</p>[% END %]
|
||||
[% IF (errcode==3) %]<p>The titles selected were not found</p>[% END %]
|
||||
<button class="btn btn-default close_window focus">Close window</button>
|
||||
</div>
|
||||
[% ELSE %]
|
||||
|
|
|
|||
|
|
@ -202,13 +202,16 @@ for my $biblionumber (@biblionumbers) {
|
|||
}
|
||||
);
|
||||
}
|
||||
$template->param(
|
||||
multiple => ( scalar(@biblios) > 1 ),
|
||||
total => scalar @biblios,
|
||||
biblios => \@biblios,
|
||||
);
|
||||
|
||||
if ( scalar(@biblios) < 1 ) {
|
||||
$errcode = 3;
|
||||
$authorized = 0; # trigger error screen
|
||||
}
|
||||
|
||||
$template->param(
|
||||
multiple => ( scalar(@biblios) > 1 ),
|
||||
total => scalar @biblios,
|
||||
biblios => \@biblios,
|
||||
newshelf => $newshelf || 0,
|
||||
authorized => $authorized,
|
||||
errcode => $errcode,
|
||||
|
|
|
|||
Loading…
Reference in New Issue