Bug 22015: Move DataTables CSS to global include
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / reports / itemtypes.tt
1 [% USE raw %]
2 [% USE Asset %]
3 [% USE Branches %]
4 [% USE ItemTypes %]
5 [% SET footerjs = 1 %]
6 [% INCLUDE 'doc-head-open.inc' %]
7 <title>Koha &rsaquo; Reports &rsaquo; Catalog by item types</title>
8 [% INCLUDE 'doc-head-close.inc' %]
9 [% IF ( do_it ) %]
10 [% END %]
11 </head>
12
13 <body id="rep_itemtypes" class="rep">
14 [% INCLUDE 'header.inc' %]
15 [% INCLUDE 'cat-search.inc' %]
16
17 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/reports/reports-home.pl">Reports</a>[% IF ( do_it ) %] &rsaquo; <a href="/cgi-bin/koha/reports/manager.pl?report_name=itemtypes">Catalog by item type</a> &rsaquo; Results[% ELSE %] &rsaquo; Catalog by item type[% END %]</div>
18
19 <div class="main container-fluid">
20     <div class="row">
21         <div class="col-sm-10 col-sm-push-2">
22             <main>
23
24
25 [% IF ( do_it ) %]
26 [% FOREACH mainloo IN mainloop %]
27     <h1>Reports on item types [% IF branch %] held at [% Branches.GetName( branch ) | html %][% END %]</h1>
28         <table id="itemtypest">
29                 <thead>
30                 <tr>
31                         <th>Item type</th>
32                         <th>Count</th>
33                 </tr>
34                 </thead>
35                 <tfoot>
36                         <tr>
37                                 <th>TOTAL</th>
38                                 <th>[% mainloo.total | html %]</th>
39                         </tr>
40                 </tfoot>
41                 <tbody>
42                         [% FOREACH loopitemtyp IN mainloo.loopitemtype %]
43                                 <tr>
44                     <td>[% ItemTypes.GetDescription( loopitemtyp.itemtype ) | html %]</td>
45                                         <td>[% loopitemtyp.count | html %]</td>
46                                 </tr>
47                         [% END %]
48                 </tbody>
49         </table>
50 [% END %]
51 [% ELSE %]
52         <h3>View a count of items held at your library grouped by item type</h3>
53         <form method="post" action="/cgi-bin/koha/reports/manager.pl?report_name=itemtypes">
54           <fieldset class="rows">
55             <ol>
56               <li>
57                 <label for="value">Select a library:</label>
58                 <select name="value" size="1" id="value">
59                   <option value=""></option>
60                   [% PROCESS options_for_libraries libraries => Branches.all() %]
61                 </select>
62                 <span class="tip">Select none to see all libraries</span>
63               </li>
64             </ol>
65           </fieldset>
66           <fieldset class="action"><input type="submit" value="Submit" />
67             <input type="hidden" name="report_name" value="[% report_name | html %]" />
68             <input type="hidden" name="do_it" value="1" />
69           </fieldset>
70         </form>
71 [% END %]
72
73             </main>
74         </div> <!-- /.col-sm-10.col-sm-push-2 -->
75
76         <div class="col-sm-2 col-sm-pull-10">
77             <aside>
78                 [% INCLUDE 'reports-menu.inc' %]
79             </aside>
80         </div> <!-- /.col-sm-2.col-sm-pull-10 -->
81      </div> <!-- /.row -->
82
83 [% MACRO jsinclude BLOCK %]
84     [% IF ( do_it ) %]
85         [% INCLUDE 'datatables.inc' %]
86         <script>
87             $(document).ready(function(){
88                 $("#itemtypest").dataTable($.extend(true, {}, dataTablesDefaults, {
89                     "sDom": 't',
90                     "bPaginate": false
91                 }));
92             });
93         </script>
94     [% END %]
95 [% END %]
96
97 [% INCLUDE 'intranet-bottom.inc' %]