Bugzilla – Attachment 28265 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]
Add datatables to account fines
0001-Adds-Datatables-to-the-Fines-Account-page-of-patrons.patch (text/plain), 3.01 KB, created by
Maxime Pelletier
on 2014-05-14 20:41:25 UTC
(
hide
)
Description:
Add datatables to account fines
Filename:
MIME Type:
Creator:
Maxime Pelletier
Created:
2014-05-14 20:41:25 UTC
Size:
3.01 KB
patch
obsolete
>From 336ea85898fb045f4113de2de65008c9077476d7 Mon Sep 17 00:00:00 2001 >From: Maxime Pelletier <maxime.pelletier@libeo.com> >Date: Thu, 7 Nov 2013 16:03:23 -0500 >Subject: 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). > >Sponsored-by: CCSR > >--- > .../prog/en/modules/members/boraccount.tt | 32 ++++++++- > lbo_RM11329_AccountFinesDataTables.patch | 68 ++++++++++++++++++++ > 2 files changed, 97 insertions(+), 3 deletions(-) > create mode 100644 lbo_RM11329_AccountFinesDataTables.patch > >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 d64c63b..9f63e41 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.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 12258
:
28265
|
32940
|
32941
|
32972
|
32996
|
33022
|
33023