Bug 13618: Add html filters to all the variables
[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 id="doc3" class="yui-t2">
21    
22    <div id="bd">
23         <div id="yui-main">
24         <div class="yui-b">
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 </div>
75 </div>
76 <div class="yui-b">
77 [% INCLUDE 'reports-menu.inc' %]
78 </div>
79 </div>
80
81 [% MACRO jsinclude BLOCK %]
82     [% IF ( do_it ) %]
83         [% INCLUDE 'datatables.inc' %]
84         <script type="text/javascript">
85             $(document).ready(function(){
86                 $("#itemtypest").dataTable($.extend(true, {}, dataTablesDefaults, {
87                     "sDom": 't',
88                     "bPaginate": false
89                 }));
90             });
91         </script>
92     [% END %]
93 [% END %]
94
95 [% INCLUDE 'intranet-bottom.inc' %]