Bugzilla – Attachment 84241 Details for
Bug 22134
Add account expiration information to patron details
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22134: (follow-up) Simplify check for expired patron
Bug-22134-follow-up-Simplify-check-for-expired-pat.patch (text/plain), 6.68 KB, created by
Katrin Fischer
on 2019-01-20 11:49:46 UTC
(
hide
)
Description:
Bug 22134: (follow-up) Simplify check for expired patron
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2019-01-20 11:49:46 UTC
Size:
6.68 KB
patch
obsolete
>From 50d87d3b4871a83d49ca258c3a1d22cf53aad493 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Fri, 18 Jan 2019 13:05:55 +0000 >Subject: [PATCH] Bug 22134: (follow-up) Simplify check for expired patron > >This patch move the check for "is_expired" to the template and removes >unnecessary code from the script. > >The page now correctly handles messages for patrons who are about to >expire, as defined in the NotifyBorrowerDeparture preference. > >To test, apply the patch and locate a patron record which is expired. > > - On the patron detail page (members/moremember.pl) you should see a > message at the top of the page. > - In the body of the page, next to the expiration date information, you > should see similar message and links. > >Select a patron who will expire within the period defined in >NotifyBorrowerDeparture. > > - On the patron detail page you should see a message at the top of the page. > - In the body of the page, next to the expiration date information, you > should see similar message and links. > >Signed-off-by: Maryse Simard <maryse.simard@inlibro.com> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > .../intranet-tmpl/prog/en/modules/members/moremember.tt | 16 +++++++++++++--- > members/moremember.pl | 11 +---------- > 2 files changed, 14 insertions(+), 13 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt >index 677bf45917..6ea8860e18 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt >@@ -133,7 +133,7 @@ > [% IF ( lost ) %] > <li class="blocker">Patron's card has been reported lost.</li> > [% END %] >- [% IF ( expired ) %] >+ [% IF ( patron.is_expired ) %] > <li class="blocker"> > <span class="circ-hlt">Expiration:</span> > [% IF ( patron.dateexpiry ) %] >@@ -141,7 +141,13 @@ > [% ELSE %] > Patron's card has expired. > [% END %] >- <a href="/cgi-bin/koha/members/setstatus.pl?borrowernumber=[% patron.borrowernumber | uri %]&destination=circ&reregistration=y">Renew</a> or <a href="/cgi-bin/koha/members/memberentry.pl?op=modify&destination=circ&borrowernumber=[% patron.borrowernumber | html %]&categorycode=[% categorycode | html %]">Edit details</a> >+ <a href="/cgi-bin/koha/members/setstatus.pl?borrowernumber=[% patron.borrowernumber | uri %]&reregistration=y">Renew</a> or <a href="/cgi-bin/koha/members/memberentry.pl?op=modify&borrowernumber=[% patron.borrowernumber | html %]&categorycode=[% categorycode | html %]">Edit details</a> >+ </li> >+ [% ELSIF ( patron.is_going_to_expire ) %] >+ <li> >+ <span class="circ-hlt">Expiration:</span> Patron's card will expire soon. >+ Patron's card expires on [% expiry | $KohaDates %] >+ <a href="/cgi-bin/koha/members/setstatus.pl?borrowernumber=[% patron.borrowernumber | uri %]&reregistration=y">Renew</a> or <a href="/cgi-bin/koha/members/memberentry.pl?op=modify&borrowernumber=[% patron.borrowernumber | html %]&categorycode=[% categorycode | html %]">Edit details</a> > </li> > [% END %] > </ul> >@@ -439,12 +445,16 @@ > <span class="label">Expiration date: </span> > [% IF ( was_renewed ) %] > <strong class="reregistrinfo">[% patron.dateexpiry | $KohaDates %]</strong> >- [% ELSIF ( expired ) %] >+ [% ELSIF ( patron.is_expired ) %] > <span class="blocker"> > [% patron.dateexpiry | $KohaDates %] > <strong><em>Expired</em></strong> > <a href="/cgi-bin/koha/members/setstatus.pl?borrowernumber=[% patron.borrowernumber | uri %]&reregistration=y">Renew</a> or <a href="/cgi-bin/koha/members/memberentry.pl?op=modify]&borrowernumber=[% patron.borrowernumber | html %]&categorycode=[% categorycode | html %]">Edit details</a> > </span> >+ [% ELSIF ( patron.is_going_to_expire ) %] >+ [% patron.dateexpiry | $KohaDates %] >+ <strong><em>Patron expires soon</em></strong> >+ <a href="/cgi-bin/koha/members/setstatus.pl?borrowernumber=[% patron.borrowernumber | uri %]&reregistration=y">Renew</a> or <a href="/cgi-bin/koha/members/memberentry.pl?op=modify]&borrowernumber=[% patron.borrowernumber | html %]&categorycode=[% categorycode | html %]">Edit details</a> > [% ELSE %] > [% patron.dateexpiry | $KohaDates %] > [% END %] >diff --git a/members/moremember.pl b/members/moremember.pl >index e76dcd019b..faaa95e613 100755 >--- a/members/moremember.pl >+++ b/members/moremember.pl >@@ -309,17 +309,8 @@ my ( $subtag, $region ) = split '-', $patron->lang; > my $translated_language = C4::Languages::language_get_description( $subtag, $subtag, 'language' ); > > # if the expiry date is before today ie they have expired >-if ( $patron->is_expired ) { >+if ( $patron->is_expired || $patron->is_going_to_expire ) { > $template->param( >- expired => "1", >- flagged => 1 >- ); >-} >-# check for NotifyBorrowerDeparture >-elsif ( $patron->is_going_to_expire ) { >- # borrower card soon to expire warn librarian >- $template->param( >- "warndeparture" => $patron->dateexpiry, > flagged => 1 > ); > } >-- >2.11.0
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 22134
:
83972
|
83998
|
84147
|
84162
|
84191
|
84214
|
84215
|
84238
|
84240
| 84241