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