Bug 20538: Remove the need of writing [% KOHA_VERSION %] everywhere
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / reports / itemtypes.tt
1 [% USE Asset %]
2 [% USE Branches %]
3 [% USE ItemTypes %]
4 [% SET footerjs = 1 %]
5 [% INCLUDE 'doc-head-open.inc' %]
6 <title>Koha &rsaquo; Reports &rsaquo; Catalog by item types</title>
7 [% INCLUDE 'doc-head-close.inc' %]
8 [% IF ( do_it ) %]
9 [% Asset.css("css/datatables.css") %]
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 id="doc3" class="yui-t2">
20    
21    <div id="bd">
22         <div id="yui-main">
23         <div class="yui-b">
24
25 [% IF ( do_it ) %]
26 [% FOREACH mainloo IN mainloop %]
27     <h1>Reports on item types [% IF branch %] held at [% Branches.GetName( branch ) %][% 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 %]</th>
39                         </tr>
40                 </tfoot>
41                 <tbody>
42                         [% FOREACH loopitemtyp IN mainloo.loopitemtype %]
43                                 <tr>
44                     <td>[% ItemTypes.GetDescription( loopitemtyp.itemtype ) %]</td>
45                                         <td>[% loopitemtyp.count %]</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 %]" />
68             <input type="hidden" name="do_it" value="1" />
69           </fieldset>
70         </form>
71 [% END %]
72
73 </div>
74 </div>
75 <div class="yui-b">
76 [% INCLUDE 'reports-menu.inc' %]
77 </div>
78 </div>
79
80 [% MACRO jsinclude BLOCK %]
81     [% IF ( do_it ) %]
82         [% INCLUDE 'datatables.inc' %]
83         <script type="text/javascript">
84             $(document).ready(function(){
85                 $("#itemtypest").dataTable($.extend(true, {}, dataTablesDefaults, {
86                     "sDom": 't',
87                     "bPaginate": false
88                 }));
89             });
90         </script>
91     [% END %]
92 [% END %]
93
94 [% INCLUDE 'intranet-bottom.inc' %]