Bugzilla – Attachment 103200 Details for
Bug 14262
Versioning updates for master
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14262: [DOES NOT WORK] Change discharge tab heading in OPAC depending on if patron was discharged
Bug-14262-DOES-NOT-WORK-Change-discharge-tab-headi.patch (text/plain), 2.19 KB, created by
Katrin Fischer
on 2020-04-18 10:37:58 UTC
(
hide
)
Description:
Bug 14262: [DOES NOT WORK] Change discharge tab heading in OPAC depending on if patron was discharged
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2020-04-18 10:37:58 UTC
Size:
2.19 KB
patch
obsolete
>From 486298a80efd55418a618dd89d388f1d0e123bf3 Mon Sep 17 00:00:00 2001 >From: Katrin Fischer <katrin.fischer.83@web.de> >Date: Mon, 13 Apr 2020 21:29:37 +0000 >Subject: [PATCH] Bug 14262: [DOES NOT WORK] Change discharge tab heading in > OPAC depending on if patron was discharged > >--- > Koha/Patron.pm | 16 ++++++++++++++++ > koha-tmpl/opac-tmpl/bootstrap/en/includes/usermenu.inc | 6 +++++- > 2 files changed, 21 insertions(+), 1 deletion(-) > >diff --git a/Koha/Patron.pm b/Koha/Patron.pm >index 9948f8c35c..0711a61a01 100644 >--- a/Koha/Patron.pm >+++ b/Koha/Patron.pm >@@ -39,6 +39,7 @@ use Koha::Holds; > use Koha::Old::Checkouts; > use Koha::Patron::Attributes; > use Koha::Patron::Categories; >+use Koha::Patron::Discharge; > use Koha::Patron::HouseboundProfile; > use Koha::Patron::HouseboundRole; > use Koha::Patron::Images; >@@ -693,6 +694,21 @@ sub is_going_to_expire { > return 0; > } > >+=head3 is_discharged >+ >+my $is_discharged = $patron->is_discharged; >+ >+Returns if the patron is currently discharged (1) or not (0). >+ >+=cut >+ >+sub is_discharged { >+ my ($self) = @_; >+ >+ my $is_discharged = Koha::Patron::Discharge->is_discharged( { borrowernumber => $self->borrowernumber } ); >+ return $is_discharged; >+} >+ > =head3 set_password > > $patron->set_password({ password => $plain_text_password [, skip_validation => 1 ] }); >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/usermenu.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/usermenu.inc >index f1cdfa5ab2..86e6f099f9 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/usermenu.inc >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/usermenu.inc >@@ -119,7 +119,11 @@ > [% ELSE %] > <li> > [% END %] >- <a href="/cgi-bin/koha/opac-discharge.pl">ask for a discharge</a></li> >+ [% IF ( logged_in_user.is_discharged ) %] >+ <a href="/cgi-bin/koha/opac-discharge.pl">download discharge confirmation</a></li> >+ [% ELSE %] >+ <a href="/cgi-bin/koha/opac-discharge.pl">ask for a discharge</a></li> >+ [% END %] > [% END %] > > [% IF Koha.Preference( 'ILLModule' ) == 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 14262
:
39453
|
39515
|
103200