From 572fc218870784d68b928ad27ff3baef80d1b57f Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Wed, 17 Nov 2021 14:17:30 +0000 Subject: [PATCH] Bug 29043: Remaining bug is the incorrect title "Place a hold on No title" This version takes account of the batch-mode. I only just add the line: $template->param( biblio => $biblio ) if scalar @biblionumbers == 1; inside the foreach loop. All my other patch-fixes are obsolete. --- .../prog/en/modules/reserve/request.tt | 54 +++---------------- reserve/request.pl | 19 +------ 2 files changed, 7 insertions(+), 66 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 59ff7e6e9f..1dd3558459 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt @@ -105,17 +105,6 @@ [% END %] - [% IF ( messagetransfert ) %] -
-

Hold found for ([% nextreservtitle | html %]), please transfer

-

Hold placed by : [% nextreservsurname | html %] [% nextreservfirstname | html %] at : [% branchname | html %] , Please transfer this item. -

-
- -
-
- [% END %] - [% UNLESS ( multi_hold ) %]

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

[% ELSE %] @@ -325,30 +314,16 @@ [% IF ( biblioloo.checked_previously ) %] Patron has previously checked out this title
[% END %] - [% IF ( biblioloo.alreadyres ) %] + [% IF ( biblioloo.none_avail || biblioloo.noitems ) %] - [% END %] [% END %] @@ -367,7 +342,7 @@ [% END %] - [% IF ( no_reserves_allowed || exceeded_maxreserves || exceeded_holds_per_record || alreadyreserved || none_available || alreadypossession || ageRestricted ) %] + [% IF ( no_reserves_allowed || exceeded_maxreserves || exceeded_holds_per_record || none_available || alreadypossession || ageRestricted ) %]
[% UNLESS ( multi_hold ) %] @@ -381,8 +356,6 @@
  • Too many holds for this record: [% patron.firstname | html %] [% patron.surname | html %] can only place a maximum of [% max_holds_for_record | html %] hold(s) on this record.
  • [% ELSIF ( alreadypossession ) %]
  • [% patron.firstname | html %] [% patron.surname | html %] is already in possession of one item.
  • - [% ELSIF ( alreadyreserved ) %] -
  • [% patron.firstname | html %] [% patron.surname | html %] already has a hold on this item.
  • [% ELSIF ( ageRestricted ) %]
  • Age restricted
  • [% ELSIF ( none_available ) %] @@ -539,7 +512,6 @@ [% END %] - [% IF remaining_holds_for_record > 1 %] @@ -838,30 +810,16 @@ [% IF ( biblioloo.checked_previously ) %] Patron has previously checked out this title
    [% END %] - [% IF ( biblioloo.alreadyres ) %] + [% IF ( biblioloo.none_avail || biblioloo.noitems ) %] - [% END %] [% END %] @@ -905,7 +863,7 @@ [% UNLESS ( patron ) %] [% IF ( reserveloop ) %] -
    + [% IF ( multi_hold ) %] [% END %] diff --git a/reserve/request.pl b/reserve/request.pl index 6affcecc3d..76d00f35bf 100755 --- a/reserve/request.pl +++ b/reserve/request.pl @@ -328,7 +328,6 @@ foreach my $biblionumber (@biblionumbers) { } my $count = Koha::Holds->search( { biblionumber => $biblionumber } )->count(); - my $totalcount = $count; # adding a fixed value for priority options my $fixedRank = $count+1; @@ -354,13 +353,7 @@ foreach my $biblionumber (@biblionumbers) { $biblioloopiter{title} = $biblio->title; $biblioloopiter{rank} = $fixedRank; - # get the time for the form name... - my $time = time(); - - $template->param( - time => $time, - fixedRank => $fixedRank, - ); + $template->param( fixedRank => $fixedRank ); unless( $patron ){ @@ -775,13 +768,3 @@ $template->param( # printout the page output_html_with_http_headers $input, $cookie, $template->output; - -sub sort_borrowerlist { - my $borrowerslist = shift; - my $ref = []; - push @{$ref}, sort { - uc( $a->{surname} . $a->{firstname} ) cmp - uc( $b->{surname} . $b->{firstname} ) - } @{$borrowerslist}; - return $ref; -} -- 2.25.1