Koha/koha-tmpl/intranet-tmpl/prog/en/modules/members/discharges.tt
Owen Leonard 6c7c97f67c Bug 22015: Move DataTables CSS to global include
DataTables are used on enough pages in the staff client that it
doesn't make sense to put inclusion of the CSS into each template
where it is needed. This patch moves includes of datatables.css from
individual templates into the global header file.

To test, apply the patch and view various pages which have DataTables.
View various styles of DataTables, e.g.

 - Full pagination, like item search results
 - Four-button, like Saved SQL reports

Everything should look the same as it was.

Signed-off-by: Jose-Mario Monteiro-Santos <jose-mario.monteiro-santos@inLibro.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-02-19 19:40:35 +00:00

74 lines
2.5 KiB
Text

[% USE raw %]
[% USE Asset %]
[% USE Branches %]
[% USE KohaDates %]
[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Koha &rsaquo; Patrons &rsaquo; Pending discharge requests</title>
[% INCLUDE 'doc-head-close.inc' %]
</head>
<body id="pat_discharges" class="pat">
[% INCLUDE 'header.inc' %]
[% INCLUDE 'patron-search.inc' %]
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a> &rsaquo; Pending discharge requests</div>
<div class="main container-fluid">
<div class="row">
<div class="col-md-8 col-md-offset-2">
[% IF pending_discharges %]
<h2>Pending discharge requests</h2>
<div id="pending_updates">
<table>
<thead>
<tr>
<th>Patron</th>
<th>Library</th>
<th class="title-string">Date requested</th>
<th>Allow</th>
</tr>
</thead>
<tbody>
[% FOREACH d IN pending_discharges %]
<tr>
<td><a href="/cgi-bin/koha/members/discharge.pl?borrowernumber=[% d.borrower.borrowernumber | uri %]">[% d.borrower.surname | html %], [% d.borrower.firstname | html %]</a></td>
<td>[% d.borrower.branchcode.branchname | html %]</td>
<td><span title="[% d.needed | html %]">[% 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 | html %]"><i class="fa fa-check"></i> Allow</a></td>
</tr>
[% END %]
</tbody>
</table>
</div>
[% ELSE %]
<div class="dialog message">
<p>There are no pending discharge requests.</p>
</div>
[% END %]
</div>
</div>
[% MACRO jsinclude BLOCK %]
[% INCLUDE 'str/members-menu.inc' %]
[% Asset.js("js/members-menu.js") | $raw %]
[% INCLUDE 'datatables.inc' %]
<script>
$(document).ready(function() {
$('#pending_updates table').DataTable($.extend(true, {}, dataTablesDefaults, {
paging: false,
info: true,
searching: true,
order: [[2, "asc"]],
columnDefs: [
{ targets: -1, orderable: false },
{ "sType": "title-string", "aTargets" : [ "title-string" ] }
],
}));
});
</script>
[% END %]
[% INCLUDE 'intranet-bottom.inc' %]