Koha/koha-tmpl/intranet-tmpl/prog/en/modules/members/statistics.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

110 lines
3.7 KiB
Text

[% USE raw %]
[% USE Asset %]
[% USE Koha %]
[% USE AuthorisedValues %]
[% USE Branches %]
[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Koha &rsaquo; Patrons &rsaquo;
[% UNLESS blocking_error %]
Statistics for [% INCLUDE 'patron-title.inc' no_html = 1 %]
[% END %]
</title>
[% INCLUDE 'doc-head-close.inc' %]
</head>
<body id="pat_statistics" 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; [% UNLESS blocking_error %]Statistics for [% INCLUDE 'patron-title.inc' invert_name = 1 %][% END %]
</div>
<div class="main container-fluid">
<div class="row">
<div class="col-sm-10 col-sm-push-2">
<main>
[% INCLUDE 'members-toolbar.inc' %]
<h3>Statistics for [% INCLUDE 'patron-title.inc' %]</h3>
[% IF ( datas.size ) %]
<table id="statistics">
<thead>
<tr>
[% FOREACH cn IN column_names %]
<th>
[% SWITCH cn %]
[% CASE 'itype' %]
Item type
[% CASE 'ccode' %]
Collection code
[% CASE 'location' %]
Shelving location
[% CASE 'homebranch' %]
Home library
[% CASE 'holdingbranch' %]
Holding library
[% CASE %]
[% cn | html %]
[% END %]
</th>
[% END %]
<th>Total checkouts as of yesterday</th>
<th>Today's checkouts</th>
<th>Today's checkins</th>
<th>Total checkouts</th>
</tr>
</thead>
<tbody>
[% FOREACH r IN datas %]
<tr>
[% FOREACH c IN r %]
<td>[% c | html %]</td>
[% END %]
</tr>
[% END %]
</tbody>
<tfoot>
<tr>
<td colspan="[% column_names.size | html %]">TOTAL</td>
<td>[% count_total_precedent_state | html %]</td>
<td>[% count_total_issues | html %]</td>
<td>[% count_total_issues_returned | html %]</td>
<td>[% count_total_actual_state | html %]</td>
</tr>
</tfoot>
</table>
[% ELSE %]
<div class="dialog message">There are no statistics for this patron.</div>
[% END %]
</main>
</div> <!-- /.col-sm-10.col-sm-push-2 -->
<div class="col-sm-2 col-sm-pull-10">
<aside>
[% INCLUDE 'circ-menu.inc' %]
</aside>
</div> <!-- /.col-sm-2.col-sm-pull-10 -->
</div> <!-- /.row -->
[% MACRO jsinclude BLOCK %]
[% INCLUDE 'str/members-menu.inc' %]
[% Asset.js("js/members-menu.js") | $raw %]
[% INCLUDE 'datatables.inc' %]
<script>
$(document).ready(function() {
$("#statistics").dataTable($.extend(true, {}, dataTablesDefaults, {
"sDom": 't',
"bPaginate": false
}));
});
</script>
[% END %]
[% INCLUDE 'intranet-bottom.inc' %]