From 39c010a87a4a969bede8cfd950552a0a606ac110 Mon Sep 17 00:00:00 2001 From: Aleisha Amohia Date: Tue, 29 Mar 2022 01:00:55 +1300 Subject: [PATCH] Bug 30291: Changes to OPAC files Signed-off-by: Tomas Cohen Arazi Signed-off-by: Martin Renvoize Signed-off-by: Fridolin Somers --- .../bootstrap/en/modules/opac-recalls.tt | 30 +++++++++---------- .../bootstrap/en/modules/opac-user.tt | 20 ++++++------- opac/opac-detail.pl | 6 ++-- opac/opac-recall.pl | 2 +- opac/opac-recalls.pl | 2 +- opac/opac-user.pl | 4 +-- 6 files changed, 32 insertions(+), 32 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-recalls.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-recalls.tt index 6fc21952c8..60f806be2f 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-recalls.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-recalls.tt @@ -47,7 +47,7 @@ [% FOREACH RECALL IN RECALLS %] - + [% RECALL.biblio.title | html %] [% FOREACH s IN RECALL.biblio.subtitle %] [% s | html %] @@ -55,19 +55,19 @@ [% RECALL.biblio.author | html %] - - + + Recall date: - [% RECALL.recalldate | $KohaDates %] + [% RECALL.created_date | $KohaDates %] - - [% IF ( RECALL.expirationdate ) %] - + + [% IF ( RECALL.expiration_date ) %] + Expiration: - [% RECALL.expirationdate | $KohaDates %] + [% RECALL.expiration_date | $KohaDates %] - [% ELSIF ( !RECALL.old ) %] + [% ELSIF ( !RECALL.completed ) %] Expiration: Never expires @@ -89,9 +89,9 @@ [% ELSIF ( RECALL.overdue ) %] Overdue to be returned [% ELSIF ( RECALL.expired ) %] - Expired on [% RECALL.expirationdate | $KohaDates %] + Expired on [% RECALL.expiration_date | $KohaDates %] [% ELSIF ( RECALL.cancelled ) %] - Cancelled on [% RECALL.cancellationdate | $KohaDates %] + Cancelled on [% RECALL.completed_date | $KohaDates %] [% ELSIF ( RECALL.fulfilled ) %] Fulfilled [% ELSE %] @@ -102,8 +102,8 @@ Due date [% IF ( RECALL.requested ) %] Due to be returned by [% RECALL.checkout.date_due | $KohaDates %] - [% ELSIF ( RECALL.waiting and RECALL.expirationdate ) %] - Pick up by [% RECALL.expirationdate | $KohaDates %] + [% ELSIF ( RECALL.waiting and RECALL.expiration_date ) %] + Pick up by [% RECALL.expiration_date | $KohaDates %] [% ELSE %] - [% END %] @@ -113,8 +113,8 @@ [% IF ( RECALL.requested or RECALL.overdue ) %]
- - + +
[% END %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt index b74499d45e..a8dcd2a5f8 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt @@ -767,19 +767,19 @@ [% FOREACH RECALL IN RECALLS %] - [% INCLUDE 'biblio-title.inc' biblio=RECALL.biblio %] [% IF RECALL.item_level_recall %]

Item recalled: [% RECALL.item.barcode | html %]

[% END %] + [% INCLUDE 'biblio-title.inc' biblio=RECALL.biblio %] [% IF RECALL.item_level %]

Item recalled: [% RECALL.item.barcode | html %]

[% END %] - - + + Recall date: - [% RECALL.recalldate | $KohaDates %] + [% RECALL.created_date | $KohaDates %] - - [% IF ( RECALL.expirationdate ) %] - + + [% IF ( RECALL.expiration_date ) %] + Expiration: - [% RECALL.expirationdate | $KohaDates %] + [% RECALL.expiration_date | $KohaDates %] [% ELSE %] @@ -808,8 +808,8 @@ [% IF ( RECALL.requested or RECALL.overdue ) %]
- - + +
[% END %] diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl index 00c52eb5aa..b281c958f6 100755 --- a/opac/opac-detail.pl +++ b/opac/opac-detail.pl @@ -735,9 +735,9 @@ if ( not $viewallitems and @items > $max_items_to_display ) { if ( C4::Context->preference('UseRecalls') ) { my $recall_status = Koha::Recalls->search( { - itemnumber => $itm->{itemnumber}, - status => 'waiting', - old => undef, + item_id => $itm->{itemnumber}, + status => 'waiting', + completed => undef, } )->count; } diff --git a/opac/opac-recall.pl b/opac/opac-recall.pl index 8cea5efb79..2a8b2497c0 100755 --- a/opac/opac-recall.pl +++ b/opac/opac-recall.pl @@ -46,7 +46,7 @@ if ( C4::Context->preference('UseRecalls') ) { my $items = Koha::Items->search({ biblionumber => $biblionumber })->as_list; # check if already recalled - my $recalled = $biblio->recalls->filter_by_current->search({ borrowernumber => $borrowernumber })->count; + my $recalled = $biblio->recalls->filter_by_current->search({ patron_id => $borrowernumber })->count; if ( defined $recalled and $recalled > 0 ) { my $recalls_per_record = Koha::CirculationRules->get_effective_rule({ categorycode => $patron->categorycode, diff --git a/opac/opac-recalls.pl b/opac/opac-recalls.pl index f3a9b5f8b4..8f094a2176 100755 --- a/opac/opac-recalls.pl +++ b/opac/opac-recalls.pl @@ -32,7 +32,7 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user( } ); -my $recalls = Koha::Recalls->search({ borrowernumber => $borrowernumber }, { order_by => { -desc => 'recalldate' } }); +my $recalls = Koha::Recalls->search({ patron_id => $borrowernumber }, { order_by => { -desc => 'created_date' } }); $template->param( RECALLS => $recalls, recallsview => 1 diff --git a/opac/opac-user.pl b/opac/opac-user.pl index 35fe373947..86960e0c84 100755 --- a/opac/opac-user.pl +++ b/opac/opac-user.pl @@ -304,7 +304,7 @@ if ( $pending_checkouts->count ) { # Useless test } if ( C4::Context->preference('UseRecalls') ) { - my $maybe_recalls = Koha::Recalls->search({ biblionumber => $issue->{biblionumber}, itemnumber => [ undef, $issue->{itemnumber} ], old => 0 }); + my $maybe_recalls = Koha::Recalls->search({ biblio_id => $issue->{biblionumber}, item_id => [ undef, $issue->{itemnumber} ], completed => 0 }); while( my $recall = $maybe_recalls->next ) { if ( $recall->checkout and $recall->checkout->issue_id == $issue->{issue_id} ) { $issue->{recall} = 1; @@ -340,7 +340,7 @@ $template->param( ); if ( C4::Context->preference('UseRecalls') ) { - my $recalls = Koha::Recalls->search( { borrowernumber => $borrowernumber, old => 0 } ); + my $recalls = Koha::Recalls->search( { patron_id => $borrowernumber, completed => 0 } ); $template->param( RECALLS => $recalls ); } -- 2.39.5