Koha/koha-tmpl/intranet-tmpl/prog/en/modules/members/statistics.tt
Owen Leonard 0e7bcede8c Bug 12693 - colspan calculation done by members/statistics.pl should be moved to template
It is not necessary for the patron statistics script to pass a colspan
value to the template. The number can be output using Template::Toolkit
syntax.

To test, view the statistics page for a patron. Confirm that the "Total"
cell in the footer spans the correct number of columns. Test with
various numbers of fields in the StatisticsFields system preference.

Followed test plan. Patch behaves as expected.
Signed-off-by: Marc Veron <veron@veron.ch>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-08-11 15:47:14 -03:00

98 lines
3.4 KiB
Text

[% INCLUDE 'doc-head-open.inc' %]
<title>Koha &rsaquo; Patrons &rsaquo;
[% IF ( unknowuser ) %]
Patron does not exist
[% ELSE %]
Statistics for [% INCLUDE 'patron-title.inc' %]
[% END %]
</title>
[% INCLUDE 'doc-head-close.inc' %]
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
[% INCLUDE 'datatables.inc' %]
[% INCLUDE 'calendar.inc' %]
<script type="text/javascript">
$(document).ready(function() {
$("#statistics").dataTable($.extend(true, {}, dataTablesDefaults, {
"sDom": 't',
"bPaginate": false
}));
});
</script>
</head>
<body>
[% 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; [% IF ( unknowuser ) %]Patron does not exist[% ELSE %]Statistics for [% firstname %] [% surname %] ([% cardnumber %])[% END %]
</div>
<div id="doc3" class="yui-t1">
<div id="bd">
<div id="yui-main">
<div class="yui-b">
[% INCLUDE 'members-toolbar.inc' %]
<h3>Statistics for [% UNLESS ( I ) %][% title %] [% firstname %] [% END %] [% surname %] ([% cardnumber %])</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 %]
[% 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 %]</td>
[% END %]
</tr>
[% END %]
</tbody>
<tfoot>
<tr>
<td colspan="[% column_names.size %]">TOTAL</td>
<td>[% count_total_precedent_state %]</td>
<td>[% count_total_issues %]</td>
<td>[% count_total_issues_returned %]</td>
<td>[% count_total_actual_state %]</td>
</tr>
</tfoot>
</table>
[% ELSE %]
<div class="dialog message">There are no statistics for this patron.</div>
[% END %]
</div>
</div>
<div class="yui-b">
[% INCLUDE 'circ-menu.inc' %]
</div>
</div>
[% INCLUDE 'intranet-bottom.inc' %]