Bug 17600: Fix overdrive_proxy and recordedbooks
[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>Catalog by item types &rsaquo; Reports &rsaquo; Koha</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 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
18     <ol>
19         <li>
20             <a href="/cgi-bin/koha/mainpage.pl">Home</a>
21         </li>
22         <li>
23             <a href="/cgi-bin/koha/reports/reports-home.pl">Reports</a>
24         </li>
25         [% IF ( do_it ) %]
26             <li>
27                 <a href="/cgi-bin/koha/reports/manager.pl?report_name=itemtypes">Catalog by item type</a>
28             </li>
29             <li>
30                 <a href="#" aria-current="page">
31                     Results
32                 </a>
33             </li>
34         [% ELSE %]
35             <li>
36                 <a href="#" aria-current="page">
37                     Catalog by item type
38                 </a>
39             </li>
40         [% END %]
41     </ol>
42 </nav>
43
44 <div class="main container-fluid">
45     <div class="row">
46         <div class="col-sm-10 col-sm-push-2">
47             <main>
48
49
50 [% IF ( do_it ) %]
51 [% FOREACH mainloo IN mainloop %]
52     <h1>Reports on item types [% IF branch %] held at [% Branches.GetName( branch ) | html %][% END %]</h1>
53         <table id="itemtypest">
54                 <thead>
55                 <tr>
56                         <th>Item type</th>
57                         <th>Count</th>
58                 </tr>
59                 </thead>
60                 <tfoot>
61                         <tr>
62                                 <th>TOTAL</th>
63                                 <th>[% mainloo.total | html %]</th>
64                         </tr>
65                 </tfoot>
66                 <tbody>
67                         [% FOREACH loopitemtyp IN mainloo.loopitemtype %]
68                                 <tr>
69                     <td>[% ItemTypes.GetDescription( loopitemtyp.itemtype ) | html %]</td>
70                                         <td>[% loopitemtyp.count | html %]</td>
71                                 </tr>
72                         [% END %]
73                 </tbody>
74         </table>
75 [% END %]
76 [% ELSE %]
77         <h3>View a count of items held at your library grouped by item type</h3>
78         <form method="post" action="/cgi-bin/koha/reports/manager.pl?report_name=itemtypes">
79           <fieldset class="rows">
80             <ol>
81               <li>
82                 <label for="value">Select a library:</label>
83                 <select name="value" id="value">
84                   <option value=""></option>
85                   [% PROCESS options_for_libraries libraries => Branches.all() %]
86                 </select>
87                 <span class="tip">Select none to see all libraries</span>
88               </li>
89             </ol>
90           </fieldset>
91           <fieldset class="action"><input type="submit" value="Submit" />
92             <input type="hidden" name="report_name" value="[% report_name | html %]" />
93             <input type="hidden" name="do_it" value="1" />
94           </fieldset>
95         </form>
96 [% END %]
97
98             </main>
99         </div> <!-- /.col-sm-10.col-sm-push-2 -->
100
101         <div class="col-sm-2 col-sm-pull-10">
102             <aside>
103                 [% INCLUDE 'reports-menu.inc' %]
104             </aside>
105         </div> <!-- /.col-sm-2.col-sm-pull-10 -->
106      </div> <!-- /.row -->
107
108 [% MACRO jsinclude BLOCK %]
109     [% IF ( do_it ) %]
110         [% INCLUDE 'datatables.inc' %]
111         <script>
112             $(document).ready(function(){
113                 $("#itemtypest").dataTable($.extend(true, {}, dataTablesDefaults, {
114                     "sDom": 't',
115                     "bPaginate": false
116                 }));
117             });
118         </script>
119     [% END %]
120 [% END %]
121
122 [% INCLUDE 'intranet-bottom.inc' %]