Bugzilla – Attachment 125862 Details for
Bug 29083
Update article requests-related Koha::Patron methods to use relationships
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29083: Don't pass _count var
Bug-29083-Dont-pass-count-var.patch (text/plain), 3.15 KB, created by
Jonathan Druart
on 2021-10-07 08:15:07 UTC
(
hide
)
Description:
Bug 29083: Don't pass _count var
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2021-10-07 08:15:07 UTC
Size:
3.15 KB
patch
obsolete
>From 7381db90f468bc183466efe30df1d33a2c2f05b0 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 7 Oct 2021 10:14:49 +0200 >Subject: [PATCH] Bug 29083: Don't pass _count var > >--- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt | 6 +++--- > opac/opac-user.pl | 4 +--- > 2 files changed, 4 insertions(+), 6 deletions(-) > >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 dac477d9098..3c6bb1206d7 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >@@ -230,7 +230,7 @@ > [% END %] > > [% IF ( RESERVES.count ) %]<li><a href="#opac-user-holds">Holds ([% RESERVES.count | html %])</a></li>[% END %] >- [% IF Koha.Preference('ArticleRequests') %]<li><a href="#opac-user-article-requests">Article requests ([% current_article_requests_count || 0 | html %])</a></li>[% END %] >+ [% IF Koha.Preference('ArticleRequests') %]<li><a href="#opac-user-article-requests">Article requests ([% current_article_requests.size || 0 | html %])</a></li>[% END %] > [% IF ( OverDriveCirculation ) %] > <li><a href="#opac-user-overdrive">OverDrive account</a></li> > [% END %] >@@ -765,7 +765,7 @@ > > [% IF Koha.Preference('ArticleRequests') %] > <div id="opac-user-article-requests"> >- [% IF current_article_requests_count %] >+ [% IF current_article_requests.size %] > <table id="article-requests-table" class="table table-bordered table-striped"> > <caption>Article requests <span class="count"></span></caption> > <thead> >@@ -866,7 +866,7 @@ > <caption class="sr-only">Article requests</caption> > <tr><td>You have no article requests currently.</td></tr> > </table> >- [% END # IF current_article_requests_count %] >+ [% END # IF current_article_requests.size %] > </div> <!-- / #opac-user-article-requests --> > [% END %] > >diff --git a/opac/opac-user.pl b/opac/opac-user.pl >index 0515b162a33..3b72d2fb982 100755 >--- a/opac/opac-user.pl >+++ b/opac/opac-user.pl >@@ -387,10 +387,8 @@ if ( C4::Context->preference('AllowPatronToSetFinesVisibilityForGuarantor') > } > > if ( C4::Context->preference("ArticleRequests") ) { >- my @current_article_requests = $patron->article_requests->filter_by_current->as_list; > $template->param( >- current_article_requests => \@current_article_requests, >- current_article_requests_count => scalar @current_article_requests, >+ current_article_requests => [$patron->article_requests->filter_by_current->as_list], > ); > } > >-- >2.25.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 29083
:
125160
|
125161
|
125162
|
125186
|
125240
|
125241
|
125242
|
125243
|
125268
|
125269
|
125270
|
125271
|
125640
|
125641
|
125642
|
125643
|
125833
|
125834
|
125835
|
125836
|
125837
|
125838
|
125840
| 125862