Bugzilla – Attachment 54204 Details for
Bug 16464
If a patron has been discharged, show a message in the OPAC
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16464 - If a patron has been discharged, show a message in the OPAC
Bug-16464---If-a-patron-has-been-discharged-show-a.patch (text/plain), 4.38 KB, created by
Owen Leonard
on 2016-08-09 13:57:40 UTC
(
hide
)
Description:
Bug 16464 - If a patron has been discharged, show a message in the OPAC
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2016-08-09 13:57:40 UTC
Size:
4.38 KB
patch
obsolete
>From 1670a2f60da22cb51f60cfcfff06ad67361e1b0e Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Tue, 9 Aug 2016 09:49:33 -0400 >Subject: [PATCH] Bug 16464 - If a patron has been discharged, show a message > in the OPAC >Content-Type: text/plain; charset="utf-8" > >This patch adds a message to the patron home page in the OPAC to be >shown if the user is restricted because of a discharge. > >To test, apply the patch and log into the OPAC as a patron who has been >discharged. > - You should see a message which says so, including a link to > the discharge notice. > - Log in to the OPAC as a patron with a manual restriction and confirm > that the correct notice is displayed. >--- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt | 14 ++++++++++---- > opac/opac-user.pl | 6 ++++++ > 2 files changed, 16 insertions(+), 4 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 a1910f3..4ffda98 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >@@ -104,10 +104,16 @@ Using this account is not recommended because some parts of Koha will not functi > <div class="alert"> > <ul> > [% IF ( userdebarred ) %] >- <li id="userdebarred"><strong>Please note:</strong> Your account has been frozen. >- [% IF ( BORROWER_INFO.debarredcomment ) %] Comment: <span id="userdebarred_comment">"[% BORROWER_INFO.debarredcomment %]"</span>[% END %] >- [% IF ( BORROWER_INFO.userdebarreddate ) %] End date: <span id="userdebarred_date">[% BORROWER_INFO.userdebarreddate | $KohaDates %]</span>[% END %] >- <em>Usually the reason for freezing an account is old overdues or damage fees. If your account shows to be clear, please contact the library.</em> <a href="/cgi-bin/koha/opac-account.pl">Go to your account page</a></li> >+ [% IF ( discharge_available ) %] >+ <li id="discharged"> >+ <strong>Please note:</strong> Your account is frozen because it has been discharged. <a href="/cgi-bin/koha/opac-discharge.pl?op=get">Get your discharge</a> >+ </li> >+ [% ELSE %] >+ <li id="userdebarred"><strong>Please note:</strong> Your account has been frozen. >+ [% IF ( BORROWER_INFO.debarredcomment ) %] Comment: <span id="userdebarred_comment">"[% BORROWER_INFO.debarredcomment %]"</span>[% END %] >+ [% IF ( BORROWER_INFO.userdebarreddate ) %] End date: <span id="userdebarred_date">[% BORROWER_INFO.userdebarreddate | $KohaDates %]</span>[% END %] >+ <em>Usually the reason for freezing an account is old overdues or damage fees. If your account shows to be clear, please contact the library.</em> <a href="/cgi-bin/koha/opac-account.pl">Go to your account page</a></li> >+ [% END %] > [% END %] > [% IF ( BORROWER_INFO.gonenoaddress ) %] > <li id="gonenoaddress"><strong>Please note:</strong> According to our records, we don't have up-to-date contact information. Please contact the library. >diff --git a/opac/opac-user.pl b/opac/opac-user.pl >index 0087a6a..6b1d98e 100755 >--- a/opac/opac-user.pl >+++ b/opac/opac-user.pl >@@ -38,6 +38,7 @@ use Koha::DateUtils; > use Koha::Holds; > use Koha::Database; > use Koha::Patron::Messages; >+use Koha::Patron::Discharge; > > use constant ATTRIBUTE_SHOW_BARCODE => 'SHOW_BCODE'; > >@@ -98,6 +99,11 @@ if ($debar) { > if ( $debar ne "9999-12-31" ) { > $borr->{'userdebarreddate'} = $debar; > } >+ my $available = Koha::Patron::Discharge::count({ >+ borrowernumber => $borrowernumber, >+ validated => 1, >+ }); >+ $template->param( 'discharge_available' => $available && Koha::Patron::Discharge::is_discharged({borrowernumber => $borrowernumber}) ); > } > > if ( $userdebarred || $borr->{'gonenoaddress'} || $borr->{'lost'} ) { >-- >2.1.4
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 16464
:
54204
|
54454
|
54774
|
54775