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 <mtompset@hotmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
parent
aa2cb3ffbb
commit
a71836f07d
|
|
@ -1,4 +1,5 @@
|
|||
[% USE Branches %]
|
||||
[% USE KohaDates %]
|
||||
[% SET footerjs = 1 %]
|
||||
[% INCLUDE 'doc-head-open.inc' %]
|
||||
<title>Koha › Patrons › Pending discharge requests</title>
|
||||
|
|
@ -23,6 +24,7 @@
|
|||
<tr>
|
||||
<th>Patron</th>
|
||||
<th>Library</th>
|
||||
<th class="title-string">Date requested</th>
|
||||
<th>Allow</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
|
@ -31,7 +33,8 @@
|
|||
<tr>
|
||||
<td><a href="/cgi-bin/koha/members/discharge.pl?borrowernumber=[% d.borrower.borrowernumber %]">[% d.borrower.surname %], [% d.borrower.firstname %]</a></td>
|
||||
<td>[% d.borrower.branchcode.branchname %]</td>
|
||||
<td><a href="/cgi-bin/koha/members/discharges.pl?op=allow&borrowernumber=[% d.borrower.borrowernumber %]">Allow</a></td>
|
||||
<td><span title="[% d.needed %]">[% d.needed | $KohaDates %]</span></td>
|
||||
<td><a class="btn btn-xs btn-default" href="/cgi-bin/koha/members/discharges.pl?op=allow&borrowernumber=[% d.borrower.borrowernumber %]"><i class="fa fa-check"></i> Allow</a></td>
|
||||
</tr>
|
||||
[% END %]
|
||||
</tbody>
|
||||
|
|
@ -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" ] }
|
||||
],
|
||||
}));
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue