Koha/koha-tmpl/intranet-tmpl/prog/en/modules/circ/on-site_checkouts.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

105 lines
4.3 KiB
Text

[% USE raw %]
[% USE Asset %]
[% USE Koha %]
[% USE Branches %]
[% USE KohaDates %]
[% USE AuthorisedValues %]
[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Koha &rsaquo; Circulation &rsaquo; Pending on-site checkouts</title>
[% INCLUDE 'doc-head-close.inc' %]
</head>
<body id="circ_stats" class="circ">
[% INCLUDE 'header.inc' %]
[% INCLUDE 'circ-search.inc' %]
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a> &rsaquo; Pending on-site checkouts</div>
<div class="main container-fluid">
<div class="row">
<div class="col-sm-12">
<main>
<div class="row">
[% IF Koha.Preference('CircSidebar') %]
<div class="col-sm-10 col-sm-push-2">
[% ELSE %]
<div class="col-md-10 col-md-offset-1 col-lg-8 col-lg-offset-2">
[% END %]
<h1>Pending on-site checkouts</h1>
[% IF pending_onsite_checkouts %]
<table id="pending_onsite_checkout">
<thead>
<tr>
<th>Date</th><th>Patron</th><th>Title</th><th>Callnumber</th><th>Barcode</th><th>Library</th><th>Location</th>
</tr>
</thead>
<tbody>
[% FOREACH item IN pending_onsite_checkouts %]
<tr>
<td>
[% IF item.is_overdue %]<span class="overdue">[% END %]
<span title="[% item.date_due | html %]">[% item.date_due | $KohaDates %]</span>
[% IF item.is_overdue %]</span>[% END %]
</td>
<td>
<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% item.borrowernumber | uri %]">[% item.firstname | html %] [% item.surname | html %]</a>
</td>
<td>
<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% item.biblionumber | uri %]"><strong>[% item.title | html %]</strong></a>[% IF ( item.author ) %], by [% item.author | html %][% END %][% IF ( item.itemnotes ) %]- <span class="circ-hlt">[% item.itemnotes | html %]</span>[% END %]
</td>
<td>[% item.itemcallnumber | html %]</td>
<td>
<a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% item.biblionumber | uri %]&amp;itemnumber=[% item.itemnumber | uri %]#item[% item.itemnumber | uri %]">[% item.barcode | html %]</a>
</td>
<td>[% Branches.GetName(item.branchcode) | html %]</td>
<td>[% AuthorisedValues.GetByCode( 'LOC', item.location ) | html %]</td>
</tr>
[% END %]
</tbody>
</table>
[% ELSE %]
<h3>No pending on-site checkout.</h3>
[% END %]
[% IF Koha.Preference('CircSidebar') %]
</div> <!-- /.col-sm-10.col-sm-push-2 -->
<div class="col-sm-2 col-sm-pull-10">
<aside>
[% INCLUDE 'circ-nav.inc' %]
</aside>
</div> <!-- /.col-sm-2.col-sm-pull-10 -->
</div> <!-- /.row -->
[% END %]
</main>
</div> <!-- /.col-sm-12 -->
</div> <!-- /.row -->
[% MACRO jsinclude BLOCK %]
[% INCLUDE 'datatables.inc' %]
<script>
$(document).ready(function(){
if ( $("#pending_onsite_checkout").length ) {
$("#pending_onsite_checkout").dataTable($.extend(true, {}, dataTablesDefaults, {
"aLengthMenu": [[10, 20, 50, 100, -1], [10, 20, 50, 100, "All"]],
"aoColumns": [
{ "sType": "title-string" },
{ "sType": "html" },
{ "sType": "html" },
null,
{ "sType": "html" },
null,
null,
],
'bAutoWidth': false,
"sPaginationType": "four_button"
}));
}
});
</script>
[% END %]
[% INCLUDE 'intranet-bottom.inc' %]