Attached is a patch to add datatables in the patron's account fines (members/boraccount.pl). 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 :p Sponsored by the CCSR
Created attachment 28265 [details] [review] Add datatables to account fines
Created attachment 32940 [details] [review] 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). 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>
Created attachment 32941 [details] [review] [Signed-off] 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). 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>
This patch fails some of the tests and the QA script - sorry: xt/single_quotes.t .......... 1/1 # Failed test 'Files do not contain single quotes _(' ' # at xt/single_quotes.t line 42. # Files list: # boraccount.tt: var txtActivefilter = _('Filter paid transactions'); # , var txtInactivefilter = _('Show all transactions'); # Looks like you failed 1 test of 1. xt/single_quotes.t .......... Dubious, test returned 1 (wstat 256, 0x100) Failed 1/1 subtests xt/tt_valid.t ............... ok xt/verify-debian-docbook.t .. ok xt/yaml_valid.t ............. ok Test Summary Report ------------------- xt/single_quotes.t (Wstat: 256 Tests: 1 Failed: 1) Failed test: 1 Non-zero exit status: 1 Files=5, Tests=82, 4 wallclock secs ( 0.07 usr 0.00 sys + 3.44 cusr 0.20 csys = 3.71 CPU) Result: FAIL FAIL koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt FAIL forbidden patterns forbidden pattern: simple-quote string (line 11) forbidden pattern: intranet-tmpl should certainly replaced with [% interface %] (line 7) forbidden pattern: simple-quote string (line 10) forbidden pattern: intranet-tmpl should certainly replaced with [% interface %] (line 4) forbidden pattern: To include datatables files, please use the include file (see bug 10868) (line 5) forbidden pattern: intranet-tmpl should certainly replaced with [% interface %] (line 5) OK tt_valid OK valid_template
Created attachment 32972 [details] [review] Bug 12258 [Template follow-up] Datatable in Patrons Account Fines This follow-up corrects some of the QA issues affecting the other patch, as well as changing the way the "filter" option is displayed: - Added the use of the DataTables include file - Removed redundant document.ready - Fixed single quotes - Fixed default sort (should be date descending to match the current functionality) - Adding missing <tr> - Converted filter button to a link The last change is a judgement call, but the button in the DataTables toolbar looked awkward and caused ugly wrapping at narrower viewport sizes. I think a link is more keeping with the pattern established by "select all / clear all" links. To test, apply both patches and view the account page (members/boraccount.pl) for a patron who has paid and unpaid fines (the more the better). - Confirm that the default sort is by date descending. - Confirm that DataTables controls (paging, search, result count) work correctly. - Confirm that clicking the "Filter paid transactions" link works correctly to toggle display of paid transactions.
Created attachment 32996 [details] [review] [Signed-off] Bug 12258 [Template follow-up] Datatable in Patrons Account Fines This follow-up corrects some of the QA issues affecting the other patch, as well as changing the way the "filter" option is displayed: - Added the use of the DataTables include file - Removed redundant document.ready - Fixed single quotes - Fixed default sort (should be date descending to match the current functionality) - Adding missing <tr> - Converted filter button to a link The last change is a judgement call, but the button in the DataTables toolbar looked awkward and caused ugly wrapping at narrower viewport sizes. I think a link is more keeping with the pattern established by "select all / clear all" links. To test, apply both patches and view the account page (members/boraccount.pl) for a patron who has paid and unpaid fines (the more the better). - Confirm that the default sort is by date descending. - Confirm that DataTables controls (paging, search, result count) work correctly. - Confirm that clicking the "Filter paid transactions" link works correctly to toggle display of paid transactions. Works as expected. Passed koha-qa.pl. Signed-off-by: Marc Véron <veron@veron.ch>
Created attachment 33022 [details] [review] [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). 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>
Created attachment 33023 [details] [review] [PASSED QA] Bug 12258 [Template follow-up] Datatable in Patrons Account Fines This follow-up corrects some of the QA issues affecting the other patch, as well as changing the way the "filter" option is displayed: - Added the use of the DataTables include file - Removed redundant document.ready - Fixed single quotes - Fixed default sort (should be date descending to match the current functionality) - Adding missing <tr> - Converted filter button to a link The last change is a judgement call, but the button in the DataTables toolbar looked awkward and caused ugly wrapping at narrower viewport sizes. I think a link is more keeping with the pattern established by "select all / clear all" links. To test, apply both patches and view the account page (members/boraccount.pl) for a patron who has paid and unpaid fines (the more the better). - Confirm that the default sort is by date descending. - Confirm that DataTables controls (paging, search, result count) work correctly. - Confirm that clicking the "Filter paid transactions" link works correctly to toggle display of paid transactions. Works as expected. Passed koha-qa.pl. Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Works as described, no problems found. Passes QA script and tests.
Patches pushed to master. Thanks Maxime!