Bug 22468: Standardize on labelling ccode table columns as Collections
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / members / statistics.tt
1 [% USE raw %]
2 [% USE Asset %]
3 [% USE Koha %]
4 [% USE AuthorisedValues %]
5 [% USE Branches %]
6 [% SET footerjs = 1 %]
7 [% INCLUDE 'doc-head-open.inc' %]
8 <title>Koha &rsaquo; Patrons &rsaquo;
9 [% UNLESS blocking_error %]
10     Statistics for [% INCLUDE 'patron-title.inc' no_html = 1 %]
11 [% END %]
12 </title>
13 [% INCLUDE 'doc-head-close.inc' %]
14 </head>
15
16 <body id="pat_statistics" class="pat">
17 [% INCLUDE 'header.inc' %]
18 [% INCLUDE 'patron-search.inc' %]
19
20 <div id="breadcrumbs">
21          <a href="/cgi-bin/koha/mainpage.pl">Home</a>
22 &rsaquo; <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a>
23 &rsaquo; [% UNLESS blocking_error %]Statistics for [% INCLUDE 'patron-title.inc' invert_name = 1 %][% END %]
24 </div>
25
26 <div class="main container-fluid">
27     <div class="row">
28         <div class="col-sm-10 col-sm-push-2">
29             <main>
30
31         [% INCLUDE 'members-toolbar.inc' %]
32
33             <h3>Statistics for [% INCLUDE 'patron-title.inc' %]</h3>
34             [% IF ( datas.size ) %]
35                 <table id="statistics">
36                 <thead>
37                     <tr>
38                       [% FOREACH cn IN column_names %]
39                           <th>
40                             [% SWITCH cn %]
41                             [% CASE 'itype' %]
42                                 Item type
43                             [% CASE 'ccode' %]
44                                 Collection
45                             [% CASE 'location' %]
46                                 Shelving location
47                             [% CASE 'homebranch' %]
48                                 Home library
49                             [% CASE 'holdingbranch' %]
50                                 Holding library
51                             [% CASE %]
52                                 [% cn | html %]
53                             [% END %]
54                           </th>
55                       [% END %]
56                       <th>Total checkouts as of yesterday</th>
57                       <th>Today's checkouts</th>
58                       <th>Today's checkins</th>
59                       <th>Total checkouts</th>
60                     </tr>
61                 </thead>
62
63                 <tbody>
64                     [% FOREACH r IN datas %]
65                         <tr>
66                             [% FOREACH c IN r %]
67                                 <td>[% c | html %]</td>
68                             [% END %]
69                         </tr>
70                     [% END %]
71                 </tbody>
72                 <tfoot>
73                     <tr>
74                         <td colspan="[% column_names.size | html %]">TOTAL</td>
75                         <td>[% count_total_precedent_state | html %]</td>
76                         <td>[% count_total_issues | html %]</td>
77                         <td>[% count_total_issues_returned | html %]</td>
78                         <td>[% count_total_actual_state | html %]</td>
79                     </tr>
80                 </tfoot>
81                 </table>
82             [% ELSE %]
83                 <div class="dialog message">There are no statistics for this patron.</div>
84             [% END %]
85
86             </main>
87         </div> <!-- /.col-sm-10.col-sm-push-2 -->
88
89         <div class="col-sm-2 col-sm-pull-10">
90             <aside>
91                 [% INCLUDE 'circ-menu.inc' %]
92             </aside>
93         </div> <!-- /.col-sm-2.col-sm-pull-10 -->
94      </div> <!-- /.row -->
95
96 [% MACRO jsinclude BLOCK %]
97     [% INCLUDE 'str/members-menu.inc' %]
98     [% Asset.js("js/members-menu.js") | $raw %]
99     [% INCLUDE 'datatables.inc' %]
100     <script>
101         $(document).ready(function() {
102             $("#statistics").dataTable($.extend(true, {}, dataTablesDefaults, {
103                 "sDom": 't',
104                 "bPaginate": false
105             }));
106         });
107     </script>
108 [% END %]
109
110 [% INCLUDE 'intranet-bottom.inc' %]