Bugzilla – Attachment 47678 Details for
Bug 15374
Translatability: Fix issues on OPAC summary page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15374 - Translatability: Fix issues on OPAC summary page
Bug-15374---Translatability-Fix-issues-on-OPAC-sum.patch (text/plain), 11.13 KB, created by
Marc Véron
on 2016-02-05 07:48:03 UTC
(
hide
)
Description:
Bug 15374 - Translatability: Fix issues on OPAC summary page
Filename:
MIME Type:
Creator:
Marc Véron
Created:
2016-02-05 07:48:03 UTC
Size:
11.13 KB
patch
obsolete
>From 1c641893a701a56ee9a0bf8b6c4d109ef819a16c Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Marc=20V=C3=A9ron?= <veron@veron.ch> >Date: Tue, 15 Dec 2015 00:11:01 +0100 >Subject: [PATCH] Bug 15374 - Translatability: Fix issues on OPAC summary page > >Fix several issues on opac-user.tt with sentences splitted by tags, >leading to odd translations. > >Additionally, fix a broken link that should point to opac-account.pl > >To test: >- Apply patch >- Log in to OPAC > - with blocked /debarred user (with and without comment and date) > - with user who has to much fines > - with user who has his card marked as lost > - with user with an account that is about to expire > - with user with expired account > - with user with uncertain address information > - with user who has got a circulation message (from checkout page) > - with user who has a OPAC note >- Verify that information is correct and displays nicely and that links > in messages work >- Carefully examine code >- Search for regressions > >(Amended to add price formatting in fines tab label) > >Can see the warning message now :) signing off > >Signed-off-by: Aleisha <aleishaamohia@hotmail.com> > >(Amended to make patches apply, see comment #12) > >Signed-off-by: Aleisha <aleishaamohia@hotmail.com> > >(Amended to make it apply and to fix BORROWER.INF -> BORROWER->INFO. > Needs new sign-off. / MV) >(Amended to fix typo from comment #24 / mv) >--- > .../opac-tmpl/bootstrap/en/modules/opac-user.tt | 32 ++++++++++++-------- > opac/opac-user.pl | 8 ++--- > 2 files changed, 24 insertions(+), 16 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 28b237e..9d39362 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >@@ -1,5 +1,6 @@ > [% USE Koha %] > [% USE KohaDates %] >+[% USE Price %] > > [% INCLUDE 'doc-head-open.inc' %] > <title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog › Your library home</title> >@@ -31,8 +32,8 @@ > <ul> > [% FOREACH bor_messages_loo IN bor_messages_loop %] > <li> >- <strong>[% bor_messages_loo.message.raw %]</strong><br> >- <i>Written on [% bor_messages_loo.message_date | $KohaDates %] by [% bor_messages_loo.branchname %]</i> >+ <strong>[% bor_messages_loo.message %]</strong><br> >+ <i>[% bor_messages_loo.message_date | $KohaDates %] [% bor_messages_loo.branchname %]</i> > </li> > [% END %] > >@@ -89,16 +90,23 @@ > <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.raw %]"</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.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 %] > [% 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> >+ <li id="gonenoaddress"><strong>Please note:</strong> According to our records, we don't have up-to-date contact information. Please contact the library. >+ <a href="/cgi-bin/koha/opac-memberentry.pl">[% IF ( Koha.Preference('OPACPatronDetails') ) %]Update your contact information[% ELSE %]Go to your contact information[% END %]</a> >+ [% IF ( Koha.Preference('OPACPatronDetails') ) %]<em>(Please note: there may be a delay in restoring your account if you submit online.)</em>[% END %] >+ </li> > [% END %] > [% IF ( BORROWER_INFO.lost ) %] >- <li id="lost"><strong>Please note: </strong> Your library card has been marked as lost or stolen. If this is an error, please contact the library.</li> >+ <li id="lost"><strong>Please note: </strong> Your library card has been marked as lost or stolen. <em>If this is an error, please contact the library.</em></li> > [% END %] >- [% IF ( renewal_blocked_fines ) && ( OpacRenewalAllowed ) %] >- <li id="renewal_blocked_fines"><strong>Please note: </strong> Since you have <a href="/cgi-bin/koha/opac-account.pl">[% IF renewal_blocked_fines != "0.00" %] more than <span id="renewal_blocked_fines_amount">[% renewal_blocked_fines %]</span> in [% END %] fines</a>, you cannot renew your books online. Please pay your fines if you wish to renew your books.</li> >+ [% IF ( renewal_blocked_fines.defined ) && ( OpacRenewalAllowed ) %] >+ <li id="renewal_blocked_fines"><strong>Please note: </strong>You cannot renew your books online. Reason: [% IF ( renewal_blocked_fines ) > 0 %]Your fines exceed <span id="renewal_blocked_fines_amount">[% renewal_blocked_fines | $Price %]</span>.[% ELSE %]You have fines.[% END %] >+ <em>Please pay your fines if you wish to renew your books.</em> <a href="/cgi-bin/koha/opac-account.pl">Go to your account page</a></li> > [% END %] > </ul> > </div> >@@ -112,9 +120,9 @@ > [% IF relatives %]<li><a href="#opac-user-relative-issues">Relatives' checkouts</a></li>[% END %] > [% IF ( overdues_count ) %]<li><a href="#opac-user-overdues">Overdue ([% overdues_count %])</a></li>[% END %] > [% IF ( OPACFinesTab ) %] >- [% IF ( BORROWER_INFO.amountoverfive ) %]<li><a href="#opac-user-fines">Fines ([% BORROWER_INFO.amountoutstanding %])</a></li>[% END %] >- [% IF ( BORROWER_INFO.amountoverzero ) %]<li><a href="#opac-user-fines">Fines ([% BORROWER_INFO.amountoutstanding %])</a></li>[% END %] >- [% IF ( BORROWER_INFO.amountlessthanzero ) %]<li><a href="#opac-user-fines">Credits ([% BORROWER_INFO.amountoutstanding %])</a></li>[% END %] >+ [% IF ( BORROWER_INFO.amountoverfive ) %]<li><a href="#opac-user-fines">Fines ([% BORROWER_INFO.amountoutstanding | $Price %])</a></li>[% END %] >+ [% IF ( BORROWER_INFO.amountoverzero ) %]<li><a href="#opac-user-fines">Fines ([% BORROWER_INFO.amountoutstanding | $Price %])</a></li>[% END %] >+ [% IF ( BORROWER_INFO.amountlessthanzero ) %]<li><a href="#opac-user-fines">Credits ([% BORROWER_INFO.amountoutstanding | $Price %])</a></li>[% END %] > [% END %] > [% IF ( RESERVES.count ) %]<li><a href="#opac-user-holds">Holds ([% RESERVES.count %])</a></li>[% END %] > </ul> >@@ -297,7 +305,7 @@ > <tbody> > <tr> > <td>You currently owe fines and charges amounting to:</td> >- <td><a href="/cgi-bin/koha/opac-account.pl">[% BORROWER_INFO.amountoutstanding %]</a></td> >+ <td><a href="/cgi-bin/koha/opac-account.pl">[% BORROWER_INFO.amountoutstanding | $Price %]</a></td> > </tr> > </tbody> > </table> >@@ -324,7 +332,7 @@ > <thead><tr><th colspan="2">Amount</th></tr></thead> > <tbody> > <tr> >- <td>You have a credit of:</td><td><a href="/cgi-bin/koha/opac-account.pl">[% BORROWER_INFO.amountoutstanding %]</a></td> >+ <td>You have a credit of:</td><td><a href="/cgi-bin/koha/opac-account.pl">[% BORROWER_INFO.amountoutstanding | $Price %]</a></td> > </tr> > </tbody> > </table> >diff --git a/opac/opac-user.pl b/opac/opac-user.pl >index 8349b6f..22ab092 100755 >--- a/opac/opac-user.pl >+++ b/opac/opac-user.pl >@@ -117,9 +117,8 @@ if ( C4::Context->preference('OpacRenewalAllowed') > $borr->{'flagged'} = 1; > $canrenew = 0; > $template->param( >- renewal_blocked_fines => sprintf( '%.02f', $no_renewal_amt ), >- renewal_blocked_fines_amountoutstanding => >- sprintf( '%.02f', $borr->{amountoutstanding} ), >+ renewal_blocked_fines => $no_renewal_amt, >+ renewal_blocked_fines_amountoutstanding => $borr->{amountoutstanding}, > ); > } > >@@ -128,7 +127,8 @@ if ( $borr->{'amountoutstanding'} < 0 ) { > $borr->{'amountoutstanding'} = -1 * ( $borr->{'amountoutstanding'} ); > } > >-$borr->{'amountoutstanding'} = sprintf "%.02f", $borr->{'amountoutstanding'}; >+my @bordat; >+$bordat[0] = $borr; > > # Warningdate is the date that the warning starts appearing > if ( $borr->{'dateexpiry'} && C4::Context->preference('NotifyBorrowerDeparture') ) { >-- >1.7.10.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 15374
:
45680
|
45876
|
45918
|
46234
|
46564
|
47626
|
47656
|
47678
|
47772
|
47842