Bugzilla – Attachment 44298 Details for
Bug 14948
Display amounts right aligned in tables on patron pages
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14948 - Display amounts right aligned in tables on patron pages
Bug-14948---Display-amounts-right-aligned-in-table.patch (text/plain), 8.51 KB, created by
Nicole C. Engard
on 2015-11-02 20:47:47 UTC
(
hide
)
Description:
Bug 14948 - Display amounts right aligned in tables on patron pages
Filename:
MIME Type:
Creator:
Nicole C. Engard
Created:
2015-11-02 20:47:47 UTC
Size:
8.51 KB
patch
obsolete
>From df9d04843056d000c8d50d98d2424756f0090c07 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Marc=20V=C3=A9ron?= <veron@veron.ch> >Date: Sun, 4 Oct 2015 11:38:03 +0200 >Subject: [PATCH] Bug 14948 - Display amounts right aligned in tables on > patron pages > >This patch set display amounts for charge, fine, price etc. right aligned in tables >on patron pages. > >To test, apply patch and verify that amounts appear right aligned on following pages: > >- Go to Home > Patrons, perform a search (Column 'Fines') >- Go to a patron with fines and credits > - Checkout tab (circulation.pl): Columns 'Charge', 'Fine', 'Price' > (maybe you have to show column with 'Show / hide colums') > - Fines Tab > Pay fines (pay.pl): Columns 'Amount', 'Amount Outstanding' > - Fines Tab > Account (boraccount.pl): Columns 'Amount', 'Outstanding' > Note: Test here 'Filter paid transactions' as well > >Signed-off-by: Nicole Engard <nengard@bywatersolutions.com> >--- > .../prog/en/includes/checkouts-table-footer.inc | 6 +++--- > koha-tmpl/intranet-tmpl/prog/en/js/checkouts.js | 6 +++--- > .../prog/en/modules/members/boraccount.tt | 20 ++++++++------------ > .../intranet-tmpl/prog/en/modules/members/pay.tt | 10 +++++----- > .../en/modules/members/tables/members_results.tt | 2 +- > 5 files changed, 20 insertions(+), 24 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table-footer.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table-footer.inc >index 0de211f..0039c8e 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table-footer.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table-footer.inc >@@ -1,9 +1,9 @@ > <tfoot> > <tr> > <td colspan="10" style="text-align: right; font-weight:bold;">Totals:</td> >- <td id="totaldue">[% totaldue %]</td> >- <td id="totalfine">[% finetotal %]</td> >- <td id="totalprice">[% totalprice %]</td> >+ <td id="totaldue" style="text-align: right;">[% totaldue %]</td> >+ <td id="totalfine" style="text-align: right;">[% finetotal %]</td> >+ <td id="totalprice" style="text-align: right;">[% totalprice %]</td> > <td colspan="3"><div class="date-select"> > <p><label for="newduedate">Renewal due date:</label> <input type="text" size="12" id="newduedate" name="newduedate" value="[% newduedate %]" readonly="readonly" /> > </p> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/js/checkouts.js b/koha-tmpl/intranet-tmpl/prog/en/js/checkouts.js >index b4b676b..f436377 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/js/checkouts.js >+++ b/koha-tmpl/intranet-tmpl/prog/en/js/checkouts.js >@@ -270,19 +270,19 @@ $(document).ready(function() { > { > "mDataProp": function ( oObj ) { > if ( ! oObj.charge ) oObj.charge = 0; >- return parseFloat(oObj.charge).toFixed(2); >+ return '<span style="text-align: right; display: block;">' + parseFloat(oObj.charge).toFixed(2) + '<span>'; > } > }, > { > "mDataProp": function ( oObj ) { > if ( ! oObj.fine ) oObj.fine = 0; >- return parseFloat(oObj.fine).toFixed(2); >+ return '<span style="text-align: right; display: block;">' + parseFloat(oObj.fine).toFixed(2) + '<span>'; > } > }, > { > "mDataProp": function ( oObj ) { > if ( ! oObj.price ) oObj.price = 0; >- return parseFloat(oObj.price).toFixed(2); >+ return '<span style="text-align: right; display: block;">' + parseFloat(oObj.price).toFixed(2) + '<span>'; > } > }, > { >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt >index e115c59..824c41c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt >@@ -102,8 +102,8 @@ $(document).ready(function() { > [%- IF account.description %], [% account.description %][% END %] > [% IF ( account.itemnumber ) %]<a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% account.biblionumber %]&itemnumber=[% account.itemnumber %]">View item</a> [% END %][% account.title |html %]</td> > <td>[% account.note | html_line_break %]</td> >- [% IF ( account.amountcredit ) %]<td class="credit">[% ELSE %]<td class="debit">[% END %][% account.amount %]</td> >- [% IF ( account.amountoutstandingcredit ) %]<td class="credit">[% ELSE %]<td class="debit">[% END %][% account.amountoutstanding %]</td> >+ [% IF ( account.amountcredit ) %]<td class="credit" style="text-align: right;">[% ELSE %]<td class="debit" style="text-align: right;">[% END %][% account.amount %]</td> >+ [% IF ( account.amountoutstandingcredit ) %]<td class="credit" style="text-align: right;">[% ELSE %]<td class="debit" style="text-align: right;">[% END %][% account.amountoutstanding %]</td> > [% IF ( reverse_col ) %] > <td> > [% IF ( account.payment ) %] >@@ -127,19 +127,15 @@ $(document).ready(function() { > <tr> > <td colspan="4">Total due</td> > [% IF ( totalcredit ) %] >- [% IF ( reverse_col ) %] >- <td colspan="3" class="credit"> >- [% ELSE %] >- <td colspan="2" class="credit"> >- [% END %] >+ <td class="credit" style="text-align: right;">[% total %]</td> > [% ELSE %] >- [% IF ( reverse_col ) %] >- <td colspan="3" class="debit"> >+ <td class="debit"style="text-align: right;">[% total %]</td> >+ [% END %] >+ [% IF ( reverse_col ) %] >+ <td colspan="2"></td> > [% ELSE %] >- <td colspan="2" class="credit"> >- [% END %] >+ <td></td> > [% END %] >- [% total %]</td> > </tr> > </tfoot> > </table> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt >index 64a0f68..e56bd61 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt >@@ -85,7 +85,7 @@ function enableCheckboxActions(){ > <tfoot> > <tr> > <td class="total" colspan="8">Total due:</td> >- <td>[% total | format('%.2f') %]</td> >+ <td style="text-align: right;">[% total | format('%.2f') %]</td> > </tr> > </tfoot> > <tbody> >@@ -142,15 +142,15 @@ function enableCheckboxActions(){ > <td>[% line.accounttype %]</td> > <td>[% line.notify_id %]</td> > <td>[% line.notify_level %]</td> >- <td class="debit">[% line.amount | format('%.2f') %]</td> >- <td class="debit">[% line.amountoutstanding | format('%.2f') %]</td> >+ <td class="debit" style="text-align: right;">[% line.amount | format('%.2f') %]</td> >+ <td class="debit" style="text-align: right;">[% line.amountoutstanding | format('%.2f') %]</td> > </tr> > [% END %] > [% IF ( account_grp.total ) %] > <tr> > >- <td class="total" colspan="8">Sub total:</td> >- <td>[% account_grp.total | format('%.2f') %]</td> >+ <td class="total" colspan="8" style="text-align: right;">Sub total:</td> >+ <td style="text-align: right;">[% account_grp.total | format('%.2f') %]</td> > </tr> > [% END %] > [% END %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/tables/members_results.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/tables/members_results.tt >index e4b7337..7d5e962 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/tables/members_results.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/tables/members_results.tt >@@ -24,7 +24,7 @@ > "dt_od_checkouts": > "[% IF data.overdues %]<span class='overdue'><strong>[% data.overdues %]</strong></span>[% ELSE %][% data.overdues %][% END %] / [% data.issues %]", > "dt_fines": >- "[% IF data.fines < 0 %]<span class='credit'>[% data.fines |html %]</span> [% ELSIF data.fines > 0 %] <span class='debit'><strong>[% data.fines |html %]</strong></span> [% ELSE %] [% data.fines |html%] [% END %]</td>", >+ "<span style='text-align: right; display: block;'>[% IF data.fines < 0 %]<span class='credit'>[% data.fines |html %]</span> [% ELSIF data.fines > 0 %] <span class='debit'><strong>[% data.fines |html %]</strong></span> [% ELSE %] [% data.fines |html%] [% END %]</span>", > "dt_borrowernotes": > "[% data.borrowernotes.replace('\\\\' , '\\\\') |html |html_line_break |collapse %]", > "dt_action": >-- >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 14948
:
43092
|
44259
|
44268
|
44298
|
44545
|
46066