Bug 9462 [Revised] Use DataTables on patron detail page
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / members / statistics.tt
1 [% INCLUDE 'doc-head-open.inc' %]
2 <title>Koha &rsaquo; Patrons &rsaquo;
3 [% IF ( unknowuser ) %]
4     Patron does not exist
5 [% ELSE %]
6     Statistics for [% INCLUDE 'patron-title.inc' %]
7 [% END %]
8 </title>
9 <link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
10 [% INCLUDE 'doc-head-close.inc' %]
11 <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.dataTables.min.js"></script>
12 [% INCLUDE 'datatables-strings.inc' %]
13 <script type="text/javascript" src="[% themelang %]/js/datatables.js"></script>
14 [% INCLUDE 'calendar.inc' %]
15 <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
16 <script type="text/javascript">
17     $(document).ready(function() {
18         $("#statistics").dataTable($.extend(true, {}, dataTablesDefaults, {
19             'bPaginate': false,
20             'bFilter': false,
21             'bInfo': false,
22         } ));
23     });
24 </script>
25 </head>
26
27 <body>
28 [% INCLUDE 'header.inc' %]
29 [% INCLUDE 'patron-search.inc' %]
30
31 <div id="breadcrumbs">
32          <a href="/cgi-bin/koha/mainpage.pl">Home</a>
33 &rsaquo; <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a>
34 &rsaquo; [% IF ( unknowuser ) %]Patron does not exist[% ELSE %]Statistics for [% firstname %] [% surname %] ([% cardnumber %])[% END %]
35 </div>
36
37 <div id="doc3" class="yui-t1">
38
39    <div id="bd">
40     <div id="yui-main">
41         <div class="yui-b">
42         [% INCLUDE 'members-toolbar.inc' %]
43
44             <h3>Statistics for [% UNLESS ( I ) %][% title %] [% firstname %] [% END %] [% surname %] ([% cardnumber %])</h3>
45             [% IF ( datas.size ) %]
46                 <table id="statistics">
47                 <thead>
48                     <tr>
49                       [% FOREACH cn IN column_names %]
50                           <th>
51                             [% SWITCH cn %]
52                             [% CASE 'itype' %]
53                                 Item type
54                             [% CASE 'ccode' %]
55                                 Collection code
56                             [% CASE 'location' %]
57                                 Shelving location
58                             [% CASE 'homebranch' %]
59                                 Home library
60                             [% CASE 'holdingbranch' %]
61                                 Holding library
62                             [% CASE %]
63                                 [% cn %]
64                             [% END %]
65                           </th>
66                       [% END %]
67                       <th>Total checkouts as of yesterday</th>
68                       <th>Today's checkouts</th>
69                       <th>Today's checkins</th>
70                       <th>Total checkouts</th>
71                     </tr>
72                 </thead>
73
74                 <tbody>
75                     [% FOREACH r IN datas %]
76                         <tr>
77                             [% FOREACH c IN r %]
78                                 <td>[% c %]</td>
79                             [% END %]
80                         </tr>
81                     [% END %]
82                 </tbody>
83                 <tfoot>
84                     <tr>
85                         <td colspan="[% length_keys %]">TOTAL</td>
86                         <td>[% count_total_precedent_state %]</td>
87                         <td>[% count_total_issues %]</td>
88                         <td>[% count_total_issues_returned %]</td>
89                         <td>[% count_total_actual_state %]</td>
90                     </tr>
91                 </tfoot>
92                 </table>
93             [% ELSE %]
94                 <div class="dialog message">There are no statistics for this patron.</div>
95             [% END %]
96         </div>
97     </div>
98 <div class="yui-b">
99 [% INCLUDE 'circ-menu.inc' %]
100 </div>
101 </div>
102 [% INCLUDE 'intranet-bottom.inc' %]