Bugzilla – Attachment 134394 Details for
Bug 30291
Rename recalls.* column names
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30291: Changes to OPAC files
Bug-30291-Changes-to-OPAC-files.patch (text/plain), 14.61 KB, created by
Martin Renvoize (ashimema)
on 2022-04-29 15:34:47 UTC
(
hide
)
Description:
Bug 30291: Changes to OPAC files
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2022-04-29 15:34:47 UTC
Size:
14.61 KB
patch
obsolete
>From d72d66767a125b363185987cefcc571c408741ef Mon Sep 17 00:00:00 2001 >From: Aleisha Amohia <aleishaamohia@hotmail.com> >Date: Tue, 29 Mar 2022 01:00:55 +1300 >Subject: [PATCH] Bug 30291: Changes to OPAC files > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > .../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 %] > <tr> > <td class="title"> >- <a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% RECALL.biblionumber | html %]"> >+ <a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% RECALL.biblio_id | html %]"> > [% RECALL.biblio.title | html %] > [% FOREACH s IN RECALL.biblio.subtitle %] > [% s | html %] >@@ -55,19 +55,19 @@ > </a> > [% RECALL.biblio.author | html %] > </td> >- <td class="recalldate" data-order="[% RECALL.recalldate | html %]"> >- <span title="[% RECALL.recalldate | html %]"> >+ <td class="recalldate" data-order="[% RECALL.created_date | html %]"> >+ <span title="[% RECALL.created_date | html %]"> > <span class="tdlabel">Recall date:</span> >- [% RECALL.recalldate | $KohaDates %] >+ [% RECALL.created_date | $KohaDates %] > </span> > </td> >- <td class="expirationdate" data-order="[% RECALL.expirationdate | html %]"> >- [% IF ( RECALL.expirationdate ) %] >- <span title="[% RECALL.expirationdate | html %]"> >+ <td class="expirationdate" data-order="[% RECALL.expiration_date | html %]"> >+ [% IF ( RECALL.expiration_date ) %] >+ <span title="[% RECALL.expiration_date | html %]"> > <span class="tdlabel">Expiration:</span> >- [% RECALL.expirationdate | $KohaDates %] >+ [% RECALL.expiration_date | $KohaDates %] > </span> >- [% ELSIF ( !RECALL.old ) %] >+ [% ELSIF ( !RECALL.completed ) %] > <span title="0000-00-00"> > <span class="tdlabel">Expiration:</span> > 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 @@ > <span class="tdlabel">Due date</span> > [% 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 ) %] > <form action="/cgi-bin/koha/opac-recall.pl" method="post"> > <input type="hidden" name="op" value="cancel"> >- <input type="hidden" name="recall_id" value="[% RECALL.recall_id | html %]"> >- <input type="hidden" name="biblionumber" value="[% RECALL.biblionumber | html %]"> >+ <input type="hidden" name="recall_id" value="[% RECALL.id | html %]"> >+ <input type="hidden" name="biblionumber" value="[% RECALL.biblio_id | html %]"> > <input type="submit" name="submit" class="btn btn-danger cancel_recall" value="Cancel"> > </form> > [% 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 45f1432659..069618479d 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 %] > <tr> > <td class="title"> >- <a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% RECALL.biblionumber | html %]">[% INCLUDE 'biblio-title.inc' biblio=RECALL.biblio %]</a> [% IF RECALL.item_level_recall %]<p class="hint">Item recalled: [% RECALL.item.barcode | html %]</p>[% END %] >+ <a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% RECALL.biblio_id | html %]">[% INCLUDE 'biblio-title.inc' biblio=RECALL.biblio %]</a> [% IF RECALL.item_level %]<p class="hint">Item recalled: [% RECALL.item.barcode | html %]</p>[% END %] > </td> >- <td class="recalldate" data-order="[% RECALL.recalldate | html %]"> >- <span title="[% RECALL.recalldate | html %]"> >+ <td class="recalldate" data-order="[% RECALL.created_date | html %]"> >+ <span title="[% RECALL.created_date | html %]"> > <span class="tdlabel">Recall date:</span> >- [% RECALL.recalldate | $KohaDates %] >+ [% RECALL.created_date | $KohaDates %] > </span> > </td> >- <td class="expirationdate" data-order="[% RECALL.expirationdate | html %]"> >- [% IF ( RECALL.expirationdate ) %] >- <span title="[% RECALL.expirationdate | html %]"> >+ <td class="expirationdate" data-order="[% RECALL.expiration_date | html %]"> >+ [% IF ( RECALL.expiration_date ) %] >+ <span title="[% RECALL.expiration_date | html %]"> > <span class="tdlabel">Expiration:</span> >- [% RECALL.expirationdate | $KohaDates %] >+ [% RECALL.expiration_date | $KohaDates %] > </span> > [% ELSE %] > <span title="0000-00-00"> >@@ -808,8 +808,8 @@ > [% IF ( RECALL.requested or RECALL.overdue ) %] > <form action="/cgi-bin/koha/opac-recall.pl" method="post"> > <input type="hidden" name="op" value="cancel"> >- <input type="hidden" name="recall_id" value="[% RECALL.recall_id | html %]"> >- <input type="hidden" name="biblionumber" value="[% RECALL.biblionumber | html %]"> >+ <input type="hidden" name="recall_id" value="[% RECALL.id | html %]"> >+ <input type="hidden" name="biblionumber" value="[% RECALL.biblio_id | html %]"> > <button type="submit" name="submit" class="btn btn-sm btn-danger cancel_recall"><i class="fa fa-remove" aria-hidden="true"></i> Cancel</button> > </form> > [% 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 5bc84c5b3f..0c1d9f5e99 100755 >--- a/opac/opac-user.pl >+++ b/opac/opac-user.pl >@@ -309,7 +309,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; >@@ -345,7 +345,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.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 30291
:
132379
|
132380
|
132381
|
132382
|
132383
|
132384
|
132385
|
132386
|
134359
|
134360
|
134361
|
134362
|
134363
|
134364
|
134365
|
134366
|
134367
|
134389
|
134390
|
134391
|
134392
|
134393
| 134394 |
134395
|
134396
|
134397
|
134629
|
134630