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