Bugzilla – Attachment 94582 Details for
Bug 23633
Filter out historical charges by default on a users 'your charges' page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23633: Hide paid transactions by default on the OPAC
Bug-23633-Hide-paid-transactions-by-default-on-the.patch (text/plain), 2.92 KB, created by
Owen Leonard
on 2019-10-22 15:35:21 UTC
(
hide
)
Description:
Bug 23633: Hide paid transactions by default on the OPAC
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2019-10-22 15:35:21 UTC
Size:
2.92 KB
patch
obsolete
>From 37f7195132570d9cdeee43b712a2578ef25d168c Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Tue, 22 Oct 2019 12:38:50 +0100 >Subject: [PATCH] Bug 23633: Hide paid transactions by default on the OPAC > >This patch adds filtering on paid for type transactions to the OPAC >accounts page. The filtering is enabled by default but may be toggled >to show historical transactions. > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >--- > .../opac-tmpl/bootstrap/en/modules/opac-account.tt | 29 +++++++++++++++++++--- > 1 file changed, 26 insertions(+), 3 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-account.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-account.tt >index baeced48c69..96cbfb390ce 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-account.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-account.tt >@@ -68,7 +68,6 @@ > > [% PROCESS 'account-table.inc' ACCOUNT_LINES = ACCOUNT_LINES, ENABLE_OPAC_PAYMENTS = ENABLE_OPAC_PAYMENTS, plugins = plugins %] > >- > </div> <!-- / #useraccount --> > </div> <!-- / .span10 --> > </div> <!-- / .row-fluid --> >@@ -82,14 +81,38 @@ > $( document ).ready(function() { > > var MSG_MIN_THRESHOLD = _("Minimum amount needed by this service is %s"); >+ var txtActivefilter = _("Filter paid transactions"); >+ var txtInactivefilter = _("Show all transactions"); > >- $("#finestable").dataTable($.extend(true, {}, dataTablesDefaults, { >+ var fines_table = $("#finestable").dataTable($.extend(true, {}, dataTablesDefaults, { > "columnDefs": [ > { "type": "title-string", "targets" : [ "title-string" ] } > ], >- "order": [[ 0, "desc" ]] >+ [% IF ENABLE_OPAC_PAYMENTS %] >+ "order": [[ 1, "desc" ]], >+ [% ELSE %] >+ "order": [[ 0, "desc" ]], >+ [% END %] >+ "dom": '<"#filter_p">', > } )); > >+ $("#filter_p").html('<p><a href="#" id="filter_paid"><i class="fa fa-filter"></i> '+txtActivefilter+'</a>'); >+ $('#filter_paid').click(function(e) { >+ e.preventDefault(); >+ if ($(this).hasClass('filtered')) { >+ var filteredValue = ''; >+ $(this).html('<i class="fa fa-filter"></i> '+txtActivefilter); >+ } else { //Not filtered. Let's do it! >+ var filteredValue = '^((?!0.00).*)$'; //Filter not matching 0.00 http://stackoverflow.com/a/406408 >+ $(this).html('<i class="fa fa-filter"></i> '+txtInactivefilter); >+ } >+ fines_table.fnFilter(filteredValue, -1, true, false); >+ $(this).toggleClass('filtered'); >+ }); >+ >+ //Start filtered >+ $('#filter_paid').click(); >+ > $(".paypal").on("click", function() { > window.open('https://www.paypal.com/webapps/mpp/paypal-popup','WIPaypal','toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=1060, height=700'); > return false; >-- >2.11.0
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 23633
:
94532
|
94582
|
94646