From 3b91e8c774177cd8009bbfbc69edc7672187b0fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20V=C3=A9ron?= 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 --- .../opac-tmpl/bootstrap/en/modules/opac-user.tt | 22 +++++++++++++------- opac/opac-user.pl | 6 ++---- 2 files changed, 17 insertions(+), 11 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 4bb2632..0c80a81 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' %] [% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog › Your library home @@ -32,7 +33,7 @@ [% FOREACH bor_messages_loo IN bor_messages_loop %]
  • [% bor_messages_loo.message %]
    -    Written on [% bor_messages_loo.message_date | $KohaDates %] by [% bor_messages_loo.branchname %] + [% bor_messages_loo.message_date | $KohaDates %] [% bor_messages_loo.branchname %]
  • [% END %] @@ -90,16 +91,23 @@
    @@ -299,7 +307,7 @@ You currently owe fines and charges amounting to: - [% BORROWER_INF.amountoutstanding %] + [% BORROWER_INF.amountoutstanding | $Price %] @@ -326,7 +334,7 @@ Amount - You have a credit of:[% BORROWER_INF.amountoutstanding %] + You have a credit of:[% BORROWER_INF.amountoutstanding | $Price %] diff --git a/opac/opac-user.pl b/opac/opac-user.pl index 54c9295..ab39110 100755 --- a/opac/opac-user.pl +++ b/opac/opac-user.pl @@ -111,8 +111,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}, ); } @@ -121,8 +121,6 @@ if ( $borr->{'amountoutstanding'} < 0 ) { $borr->{'amountoutstanding'} = -1 * ( $borr->{'amountoutstanding'} ); } -$borr->{'amountoutstanding'} = sprintf "%.02f", $borr->{'amountoutstanding'}; - my @bordat; $bordat[0] = $borr; -- 1.7.10.4