Owen Leonard
4284cbf206
This patch adds the circ/members toolbar, corrects page title and breadcrumbs, and adds some handling for column names which are coming from the database. The table of statistics can display any items table column specified in the StatisticsFields preference, but we can at least embed the most obvious cases in the template for human readability: item type, collection code, location, home library, and holding library. To test, view the patron statistics page. For a patron with no statistics you should see a message saying so. For a patron with statistics you should see human-friendly labels for the columns referenced above. Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Comment: Works as described. No errors. Wouldn't be better with centered cell contents? Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> FIX a typo: - <h3>Statistcs for [% UNLESS ( I ) %][% title %] [% firstname %] [% END %] [% surname %] ([% cardnumber %])</h3> + <h3>Statistics for [% UNLESS ( I ) %][% title %] [% firstname %] [% END %] [% surname %] ([% cardnumber %])</h3> Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
102 lines
3.7 KiB
Text
102 lines
3.7 KiB
Text
[% INCLUDE 'doc-head-open.inc' %]
|
|
<title>Koha › Patrons ›
|
|
[% IF ( unknowuser ) %]
|
|
Patron does not exist
|
|
[% ELSE %]
|
|
Statistics for [% INCLUDE 'patron-title.inc' %]
|
|
[% END %]
|
|
</title>
|
|
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
|
|
[% INCLUDE 'doc-head-close.inc' %]
|
|
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.dataTables.min.js"></script>
|
|
[% INCLUDE 'datatables-strings.inc' %]
|
|
<script type="text/javascript" src="[% themelang %]/js/datatables.js"></script>
|
|
[% INCLUDE 'calendar.inc' %]
|
|
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
|
|
<script type="text/javascript">
|
|
$(document).ready(function() {
|
|
$("#statistics").dataTable($.extend(true, {}, dataTablesDefaults, {
|
|
'bPaginate': false,
|
|
'bFilter': false,
|
|
'bInfo': false,
|
|
} ));
|
|
});
|
|
</script>
|
|
</head>
|
|
|
|
<body>
|
|
[% INCLUDE 'header.inc' %]
|
|
[% INCLUDE 'patron-search.inc' %]
|
|
|
|
<div id="breadcrumbs">
|
|
<a href="/cgi-bin/koha/mainpage.pl">Home</a>
|
|
› <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a>
|
|
› [% 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="[% length_keys %]">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' %]
|