Bugzilla – Attachment 52804 Details for
Bug 12509
Untranslatable "Restriction added by overdues process"
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12509 - Fix Untranslatable Restriction added by overdues process
Bug-12509---Fix-Untranslatable-Restriction-added-b.patch (text/plain), 11.41 KB, created by
Kyle M Hall (khall)
on 2016-06-24 14:20:37 UTC
(
hide
)
Description:
Bug 12509 - Fix Untranslatable Restriction added by overdues process
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2016-06-24 14:20:37 UTC
Size:
11.41 KB
patch
obsolete
>From 5fd4365efe8f46866b1a95295cc6419f63b4c8c7 Mon Sep 17 00:00:00 2001 >From: Morgane Alonso <morgane.alonso@biblibre.com> >Date: Mon, 6 Jun 2016 12:24:56 +0000 >Subject: [PATCH] Bug 12509 - Fix Untranslatable Restriction added by overdues > process > >Changes the value of the "comment" column in "borrower_debarments" table >from "Restriction added by overdues process yyyy-mm-dd hh:mm:ss" to >"OVERDUE_PROCESS yyyy-mm-dd hh:mm:ss" in the overdue_notices.pl. Then in >the templates "moremember.tt", "circulation.tt", "memberentrygen.tt", >"opac-reserve.tt" and "opac-user.tt" the value of "comment" is >check, if it's an automatical comment due to overdue process it'll >write "Restriction added by overdues process yyyy-mm-dd hh:mm:ss", >then if there is a customizable comment it will be written without >modification. Like this, the comment "Restriction added by overdues >process" is written in the po files and can be translated later. > >To test: >1) create a patron with automatical restriction due to overdue process; >2) apply patch; >3) run misc/cronjobs/overdue_notices.pl; >4) verify if the comment "Restriction added by overdues process" is well > written and translatable on the following page : > - opac patron home page (opac-user.tt); > - opac item reservation page (opac-reserve.tt); > - pro patron page (moremember.tt); > - reservation item for a patron (circulation.tt, memberentrygen.tt); >5) try to translate the comment in po files; >6) sign off. > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > .../intranet-tmpl/prog/en/includes/borrower_debarments.inc | 8 +++++++- > koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt | 7 ++++++- > .../intranet-tmpl/prog/en/modules/members/memberentrygen.tt | 8 +++++++- > koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt | 7 ++++++- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt | 10 +++++++++- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt | 11 ++++++++++- > misc/cronjobs/overdue_notices.pl | 3 +-- > 7 files changed, 46 insertions(+), 8 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/borrower_debarments.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/borrower_debarments.inc >index e3adea0..b0e3230 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/borrower_debarments.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/borrower_debarments.inc >@@ -56,7 +56,13 @@ > Discharge > [% END %] > </td> >- <td>[% d.comment %]</td> >+ <td> >+ [% IF d.comment.search('OVERDUES_PROCESS') %] >+ Restriction added by overdues process [% d.comment.remove('OVERDUES_PROCESS ') %] >+ [% ELSE %] >+ [% d.comment %] >+ [% END %] >+ </td> > <td>[% IF d.expiration %] [% d.expiration | $KohaDates %] [% ELSE %] <i>Indefinite</i> [% END %]</td> > [% IF CAN_user_borrowers && CAN_user_circulate_manage_restrictions %] > <td> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >index 0056dfc..b149eb2 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >@@ -747,7 +747,12 @@ No patron matched <span class="ex">[% message %]</span> > [% END %] > > [% IF ( debarredcomment ) %] >- with the explanation: <br/><i>[% debarredcomment | html_line_break %]</i> >+ with the explanation: <br/><i> >+ [% IF debarredcomment.search('OVERDUES_PROCESS') %] >+ Restriction added by overdues process [% debarredcomment.remove('OVERDUES_PROCESS ') | html_line_break %] >+ [% ELSE %] >+ [% debarredcomment | html_line_break %] >+ [% END %] > [% END %] > > <br/> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt >index 17eeb5b..62542d5 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt >@@ -891,7 +891,13 @@ $(document).ready(function() { > [% FOREACH d IN debarments %] > <tr> > <td>[% d.type %]</td> >- <td>[% d.comment %]</td> >+ <td> >+ [% IF d.comment.search('OVERDUES_PROCESS') %] >+ Restriction added by overdues process [% d.comment.remove('OVERDUES_PROCESS ') %] >+ [% ELSE %] >+ [% d.comment %] >+ [% END %] >+ </td> > <td>[% IF d.expiration %] [% d.expiration | $KohaDates %] [% ELSE %] <i>Indefinite</i> [% END %]</td> > [% IF CAN_user_borrowers && CAN_user_circulate_manage_restrictions %] > <td> >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 0847fca..55ec71a 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt >@@ -189,7 +189,12 @@ function validate1(date) { > [% END %] > > [% IF ( debarredcomment ) %] >- with the explanation: <i>[% debarredcomment | html_line_break %]</i> >+ with the explanation: <i> >+ [% IF debarredcomment.search('OVERDUES_PROCESS') %] >+ Restriction added by overdues process [% debarredcomment.remove('OVERDUES_PROCESS ') | html_line_break %] >+ [% ELSE %] >+ [% debarredcomment | html_line_break %] >+ [% END %] > [% END %] > <a href="#reldebarments" id="view_restrictions">View restrictions</a> > </li> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt >index eb1cd3c..6769851 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt >@@ -41,7 +41,15 @@ > [% IF ( debarred ) %] > <li id="debarred"> > Your account has been frozen. >- [% IF debarred_comment %] Comment: <span id="userdebarred_comment">"[% debarred_comment %]"</span>[% END %] >+ [% IF debarred_comment %] Comment: <span id="userdebarred_comment">" >+ [% IF debarred_comment.search('OVERDUES_PROCESS') %] >+ Restriction added by overdues process [% debarred_comment.remove('OVERDUES_PROCESS ') | html_line_break %] >+ [% ELSE %] >+ [% debarred_comment | html_line_break %] >+ [% END %] >+ </span> >+ [% END %] >+ > [% IF debarred_date && debarred_date != '9999-12-31' %] End date: <span id="userdebarred_date">[% debarred_date | $KohaDates %]</span>[% END %] > <br /><em>Usually the reason for freezing an account is old overdues or damage fees. If shows your account to be clear, please contact the library.</em> <a href="/cgi-bin/koha/opac-account.pl">Go to your account page</a> > </li> >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 264641f..a1f7db3 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >@@ -91,7 +91,16 @@ > <div class="alert"> > <ul> > [% IF ( userdebarred ) %] >- <li id="userdebarred"><strong>Please note:</strong> Your account has been frozen[% IF ( BORROWER_INFO.userdebarreddate ) %] until <span id="userdebarred_date">[% BORROWER_INFO.userdebarreddate | $KohaDates %]</span>[% END %][% IF ( BORROWER_INFO.debarredcomment ) %] with the comment <span id="userdebarred_comment">"[% BORROWER_INFO.debarredcomment %]"</span>[% END %]. Usually the reason for freezing an account is old overdues or damage fees. If <a href="/cgi-bin/koha/opac-account.pl">your account page</a> shows your account to be clear, please contact the library.</li> >+ <li id="userdebarred"><strong>Please note:</strong> Your account has been frozen[% IF ( BORROWER_INFO.userdebarreddate ) %] until <span id="userdebarred_date">[% BORROWER_INFO.userdebarreddate | $KohaDates %]</span>[% END %] >+ [% IF ( BORROWER_INFO.debarredcomment ) %] with the comment >+ <span id="userdebarred_comment"> >+ [% IF BORROWER_INFO.debarredcomment.search('OVERDUES_PROCESS') %] >+ "Restriction added by overdues process [% BORROWER_INFO.debarredcomment.remove('OVERDUES_PROCESS ') %]" >+ [% ELSE %] >+ [% BORROWER_INFO.debarredcomment %] >+ [% END %] >+ </span> >+ [% END %]. Usually the reason for freezing an account is old overdues or damage fees. If <a href="/cgi-bin/koha/opac-account.pl">your account page</a> shows your account to be clear, please contact the library.</li> > [% END %] > [% IF ( BORROWER_INFO.gonenoaddress ) %] > <li id="gonenoaddress"><strong>Please note:</strong> According to our records, we don't have up-to-date [% UNLESS OPACPatronDetails %]<a href="/cgi-bin/koha/opac-memberentry.pl">contact information</a>[% ELSE %]contact information[% END %] on file. Please contact the library[% IF OPACPatronDetails %] or use the <a href="/cgi-bin/koha/opac-memberentry.pl">online update form</a> to submit current information (<em>Please note:</em> there may be a delay in restoring your account if you submit online)[% END %].</li> >diff --git a/misc/cronjobs/overdue_notices.pl b/misc/cronjobs/overdue_notices.pl >index 06fec8f..050882d 100755 >--- a/misc/cronjobs/overdue_notices.pl >+++ b/misc/cronjobs/overdue_notices.pl >@@ -598,8 +598,7 @@ END_SQL > { > borrowernumber => $borrowernumber, > type => 'OVERDUES', >- comment => "Restriction added by overdues process " >- . output_pref( dt_from_string() ), >+ comment => "OVERDUES_PROCESS " . output_pref( dt_from_string() ), > } > ); > $verbose and warn "debarring $borr\n"; >-- >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 12509
:
52084
|
52129
|
52634
|
52685
| 52804