From a71836f07db418e5c82b5cd55882a1e4d34c732d Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Thu, 5 Apr 2018 13:59:18 +0000 Subject: [PATCH] Bug 20526: Show and sort by date of request in pending discharges table This patch adds a "date requested" column to the table of pending discharges, and updates the DataTables configuration to sort by this column by default. The patch also makes some other changes: - Table information and filtering have been added. - The "Allow" link has been converted to a Bootstrap-styled buttong with an icon. To test, apply the patch and view the table of pending discharge requests. It should be sorted by default by date requested. - Confirm that date sorting is correct. - Confirm that other columns still sort correctly. - Confirm that buttons look right. - Confirm that the table information is correct. - Confirm that the table search form works. Signed-off-by: Mark Tompsett Signed-off-by: Katrin Fischer Signed-off-by: Jonathan Druart --- .../prog/en/modules/members/discharges.tt | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/discharges.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/discharges.tt index 2f63f3dac3..254a1d9e84 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/discharges.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/discharges.tt @@ -1,4 +1,5 @@ [% USE Branches %] +[% USE KohaDates %] [% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha › Patrons › Pending discharge requests @@ -23,6 +24,7 @@ Patron Library + Date requested Allow @@ -31,7 +33,8 @@ [% d.borrower.surname %], [% d.borrower.firstname %] [% d.borrower.branchcode.branchname %] - Allow + [% d.needed | $KohaDates %] + Allow [% END %] @@ -54,11 +57,12 @@ $(document).ready(function() { $('#pending_updates table').DataTable($.extend(true, {}, dataTablesDefaults, { paging: false, - info: false, - searching: false, - order: [], + info: true, + searching: true, + order: [[2, "asc"]], columnDefs: [ { targets: -1, orderable: false }, + { "sType": "title-string", "aTargets" : [ "title-string" ] } ], })); }); -- 2.39.5