Bugzilla – Attachment 46234 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), 10.83 KB, created by
Marc Véron
on 2016-01-04 17:24:20 UTC
(
hide
)
Description:
Bug 15374 - Translatability: Fix issues on OPAC summary page
Filename:
MIME Type:
Creator:
Marc Véron
Created:
2016-01-04 17:24:20 UTC
Size:
10.83 KB
patch
obsolete
>From 00bd08e9762a8db60a4a433ba8989da1334b4fdc 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) >--- > .../opac-tmpl/bootstrap/en/modules/opac-user.tt | 32 ++++++++++++-------- > opac/opac-user.pl | 7 +++-- > 2 files changed, 24 insertions(+), 15 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 e21af85..4e0bcdb 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> >@@ -32,7 +33,7 @@ > [% FOREACH bor_messages_loo IN bor_messages_loop %] > <li> > <strong>[% bor_messages_loo.message %]</strong><br> >- <i>Written on [% bor_messages_loo.message_date | $KohaDates %] by [% bor_messages_loo.branchname %]</i> >+ <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 %]"</span>[% END %]. Usually the reason for freezing an account is old overdues or damage fees. If <a href="/cgi-bin/koha/opac-user.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_INF.debarredcomment ) %] Comment: <span id="userdebarred_comment">"[% BORROWER_INF.debarredcomment %]"</span>[% END %] >+ [% IF ( BORROWER_INF.userdebarreddate ) %] End date: <span id="userdebarred_date">[% BORROWER_INF.userdebarreddate | $KohaDates %]</span>[% END %] >+ <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> > [% 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-userupdate.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-userupdate.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> >+ [% IF ( BORROWER_INF.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. >+ <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> >+ [% IF ( BORROWER_INF.lost ) %] >+ <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> >+ <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> >@@ -113,9 +121,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_INF.amountoverfive ) %]<li><a href="#opac-user-fines">Fines ([% BORROWER_INF.amountoutstanding %])</a></li>[% END %] >- [% IF ( BORROWER_INF.amountoverzero ) %]<li><a href="#opac-user-fines">Fines ([% BORROWER_INF.amountoutstanding %])</a></li>[% END %] >- [% IF ( BORROWER_INF.amountlessthanzero ) %]<li><a href="#opac-user-fines">Credits ([% BORROWER_INF.amountoutstanding %])</a></li>[% END %] >+ [% IF ( BORROWER_INF.amountoverfive ) %]<li><a href="#opac-user-fines">Fines ([% BORROWER_INF.amountoutstanding | $Price %])</a></li>[% END %] >+ [% IF ( BORROWER_INF.amountoverzero ) %]<li><a href="#opac-user-fines">Fines ([% BORROWER_INF.amountoutstanding | $Price %])</a></li>[% END %] >+ [% IF ( BORROWER_INF.amountlessthanzero ) %]<li><a href="#opac-user-fines">Credits ([% BORROWER_INF.amountoutstanding | $Price %])</a></li>[% END %] > [% END %] > [% IF ( RESERVES.count ) %]<li><a href="#opac-user-holds">Holds ([% RESERVES.count %])</a></li>[% END %] > </ul> >@@ -298,7 +306,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_INF.amountoutstanding | $Price %]</a></td> > </tr> > </tbody> > </table> >@@ -325,7 +333,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_INF.amountoutstanding | $Price %]</a></td> > </tr> > </tbody> > </table> >diff --git a/opac/opac-user.pl b/opac/opac-user.pl >index 9d1f9b2..7a2eaf9 100755 >--- a/opac/opac-user.pl >+++ b/opac/opac-user.pl >@@ -113,8 +113,8 @@ if ( C4::Context->preference( 'OpacRenewalAllowed' ) && $borr->{amountoutstandi > $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}, > ); > } > >@@ -123,7 +123,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