Bugzilla – Attachment 14314 Details for
Bug 9329
Wrong message for already expired cards
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
proposed patch
0001-Bug-9329-OPAC-new-warning-when-the-card-has-expired.patch (text/plain), 2.69 KB, created by
Adrien SAURAT
on 2012-12-28 15:43:59 UTC
(
hide
)
Description:
proposed patch
Filename:
MIME Type:
Creator:
Adrien SAURAT
Created:
2012-12-28 15:43:59 UTC
Size:
2.69 KB
patch
obsolete
>From 195d4028322a1b474124726987dc55c2a8c524f5 Mon Sep 17 00:00:00 2001 >From: Adrien Saurat <adrien.saurat@biblibre.com> >Date: Fri, 28 Dec 2012 16:37:59 +0100 >Subject: [PATCH] Bug 9329: OPAC, new warning when the card has expired > >--- > koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt | 6 ++++++ > opac/opac-user.pl | 21 ++++++++++++--------- > 2 files changed, 18 insertions(+), 9 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt >index c28d84f..c0c19a1 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt >+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt >@@ -89,6 +89,12 @@ $.tablesorter.addParser({ > </div> > [% END %] > >+ [% IF ( BORROWER_INF.warnexpired ) %] >+ <div class="dialog alert" id="warnexpired"> >+ <strong>Please note:</strong><span> Your card has expired. Please contact the library for more information.</span> >+ </div> >+ [% END %] >+ > [% IF ( patron_flagged ) %] > <div class="dialog alert"> > <ul> >diff --git a/opac/opac-user.pl b/opac/opac-user.pl >index 1c942d5..63d9134 100755 >--- a/opac/opac-user.pl >+++ b/opac/opac-user.pl >@@ -125,17 +125,20 @@ my @bordat; > $bordat[0] = $borr; > > # Warningdate is the date that the warning starts appearing >-if ( $borr->{dateexpiry} && C4::Context->preference('NotifyBorrowerDeparture') && >- Date_to_Days(Add_Delta_Days($warning_year,$warning_month,$warning_day,- C4::Context->preference('NotifyBorrowerDeparture'))) < >- Date_to_Days( $today_year, $today_month, $today_day ) ) >-{ >- # borrower card soon to expire, warn the borrower >- $borr->{'warndeparture'} = $borr->{dateexpiry}; >- if (C4::Context->preference('ReturnBeforeExpiry')){ >- $borr->{'returnbeforeexpiry'} = 1; >- } >+if ( $borr->{dateexpiry} && Date_to_Days( $today_year, $today_month, $today_day ) > Date_to_Days( $warning_year, $warning_month, $warning_day ) ) { >+ $borr->{'warnexpired'} = 1; >+} >+elsif ( $borr->{dateexpiry} && C4::Context->preference('NotifyBorrowerDeparture') && >+ Date_to_Days(Add_Delta_Days($warning_year, $warning_month, $warning_day,- C4::Context->preference('NotifyBorrowerDeparture'))) < >+ Date_to_Days( $today_year, $today_month, $today_day ) ) { >+ # borrower card soon to expire, warn the borrower >+ $borr->{'warndeparture'} = $borr->{dateexpiry}; >+ if (C4::Context->preference('ReturnBeforeExpiry')){ >+ $borr->{'returnbeforeexpiry'} = 1; >+ } > } > >+ > $template->param( BORROWER_INFO => \@bordat, > borrowernumber => $borrowernumber, > patron_flagged => $borr->{flagged}, >-- >1.7.5.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 9329
:
14314
|
14316
|
15159