Bugzilla – Attachment 33022 Details for
Bug 12258
Datatable in Patrons Account Fines
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 12258 Adds Datatables to the Fines->Account page of patrons (members/boraccount.pl). Also adds a button "Filter paid transactions" to hide fines with no outstanding value (0.00).
PASSED-QA-Bug-12258-Adds-Datatables-to-the-Fines-A.patch (text/plain), 3.38 KB, created by
Katrin Fischer
on 2014-10-31 06:02:37 UTC
(
hide
)
Description:
[PASSED QA] Bug 12258 Adds Datatables to the Fines->Account page of patrons (members/boraccount.pl). Also adds a button "Filter paid transactions" to hide fines with no outstanding value (0.00).
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2014-10-31 06:02:37 UTC
Size:
3.38 KB
patch
obsolete
>From 89e9a3cafab41e2ff095a80a0ca9fc199b9a621a Mon Sep 17 00:00:00 2001 >From: Maxime Pelletier <maxime.pelletier@libeo.com> >Date: Thu, 7 Nov 2013 16:03:23 -0500 >Subject: [PATCH] [PASSED QA] Bug 12258 Adds Datatables to the Fines->Account > page of patrons (members/boraccount.pl). Also adds a button "Filter paid > transactions" to hide fines with no outstanding value (0.00). >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >Test steps : > >* Create a few manual invoices with fines. >* Pay a fine. >* Go back to the account tab. >* Try the "Filter paid transactions" button. It should filter everything with 0.00 in the Outstanding column. >* Try the "Show all transactions" button. >* Play around with the buttons > >Followed test steps. Works as expected. >Signed-off-by: Marc Véron <veron@veron.ch> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > .../prog/en/modules/members/boraccount.tt | 32 ++++++++++++++++++++-- > 1 file changed, 29 insertions(+), 3 deletions(-) > >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 26808a3..b6c06d9 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt >@@ -1,6 +1,32 @@ > [% INCLUDE 'doc-head-open.inc' %] > <title>Koha › Patrons › Account for [% INCLUDE 'patron-title.inc' %]</title> > [% INCLUDE 'doc-head-close.inc' %] >+<link rel="stylesheet" type="text/css" href="/intranet-tmpl/prog/en/css/datatables.css" /> >+<script type="text/javascript" src="/intranet-tmpl/lib/jquery/plugins/jquery.dataTables.min.js"></script> >+[% INCLUDE 'datatables-strings.inc' %] >+<script type="text/javascript" src="/intranet-tmpl/prog/en/js/datatables.js"></script> >+<script type="text/javascript" id="js">$(document).ready(function() { >+ $(document).ready(function() { >+ var txtActivefilter = _('Filter paid transactions'); >+ var txtInactivefilter = _('Show all transactions'); >+ var table_account_fines = $("#table_account_fines").dataTable($.extend(true, {}, dataTablesDefaults, { >+ "sPaginationType": "four_button", >+ "iDisplayLength" : 25 >+ })); >+ $('<button id="filter_transacs">'+txtActivefilter+'</button>').appendTo($("#table_account_fines_filter")); >+ $('#filter_transacs').click(function() { >+ if ($(this).hasClass('filtered')) { >+ var filteredValue = ''; >+ $('#filter_transacs').text(txtActivefilter); >+ } else { //Not filtered. Let's do it! >+ var filteredValue = '^((?!0.00).*)$'; //Filter not matching 0.00 http://stackoverflow.com/a/406408 >+ $('#filter_transacs').text(txtInactivefilter); >+ } >+ table_account_fines.fnFilter(filteredValue, 4, true, false); >+ $(this).toggleClass('filtered'); >+ }); >+ }); >+}); </script> > </head> > <body id="pat_borraccount" class="pat"> > [% INCLUDE 'header.inc' %] >@@ -26,8 +52,8 @@ > </ul> > <div class="tabs-container"> > <!-- The table with the account items --> >-<table> >- <tr> >+<table id="table_account_fines"> >+ <thead> > <th>Date</th> > <th>Description of charges</th> > <th>Note</th> >@@ -37,7 +63,7 @@ > <th> </th> > [% END %] > <th>Print</th> >- </tr> >+ </thead> > > <!-- FIXME: Shouldn't hardcode dollar signs, since Euro or Pound might be needed --> > [% FOREACH account IN accounts %] >-- >1.9.1
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 12258
:
28265
|
32940
|
32941
|
32972
|
32996
| 33022 |
33023