Bug 8612: [QA Follow-up] Remove two newlines from template output
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / reports / itemtypes.tt
1 [% USE Branches %]
2 [% USE ItemTypes %]
3 [% INCLUDE 'doc-head-open.inc' %]
4 <title>Koha &rsaquo; Reports &rsaquo; Catalog by item types</title>
5 [% INCLUDE 'doc-head-close.inc' %]
6 [% IF ( do_it ) %]
7 <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
8 [% INCLUDE 'datatables.inc' %]
9 <script type="text/javascript">
10 //<![CDATA[
11 $(document).ready(function(){
12     $("#itemtypest").dataTable($.extend(true, {}, dataTablesDefaults, {
13         "sDom": 't',
14         "bPaginate": false
15     }));
16 });
17 //]]>
18 </script>
19 [% END %]
20 </head>
21 <body id="rep_itemtypes" class="rep">
22 [% INCLUDE 'header.inc' %]
23 [% INCLUDE 'cat-search.inc' %]
24
25 <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>
26
27 <div id="doc3" class="yui-t2">
28    
29    <div id="bd">
30         <div id="yui-main">
31         <div class="yui-b">
32
33 [% IF ( do_it ) %]
34 [% FOREACH mainloo IN mainloop %]
35     <h1>Reports on item types [% IF branch %] held at [% Branches.GetName( branch ) %][% END %]</h1>
36         <table id="itemtypest">
37                 <thead>
38                 <tr>
39                         <th>Item type</th>
40                         <th>Count</th>
41                 </tr>
42                 </thead>
43                 <tfoot>
44                         <tr>
45                                 <th>TOTAL</th>
46                                 <th>[% mainloo.total %]</th>
47                         </tr>
48                 </tfoot>
49                 <tbody>
50                         [% FOREACH loopitemtyp IN mainloo.loopitemtype %]
51                                 <tr>
52                     <td>[% ItemTypes.GetDescription( loopitemtyp.itemtype ) %]</td>
53                                         <td>[% loopitemtyp.count %]</td>
54                                 </tr>
55                         [% END %]
56                 </tbody>
57         </table>
58 [% END %]
59 [% ELSE %]
60         <h3>View a count of items held at your library grouped by item type</h3>
61         <form method="post" action="/cgi-bin/koha/reports/manager.pl?report_name=itemtypes">
62           <fieldset class="rows">
63             <ol>
64               <li>
65                 <label for="value">Select a library:</label>
66                 <select name="value" size="1" id="value">
67                   <option value=""></option>
68                   [% PROCESS options_for_libraries libraries => Branches.all() %]
69                 </select>
70                 <span class="tip">Select none to see all libraries</span>
71               </li>
72             </ol>
73           </fieldset>
74           <fieldset class="action"><input type="submit" value="Submit" />
75             <input type="hidden" name="report_name" value="[% report_name %]" />
76             <input type="hidden" name="do_it" value="1" />
77           </fieldset>
78         </form>
79 [% END %]
80
81 </div>
82 </div>
83 <div class="yui-b">
84 [% INCLUDE 'reports-menu.inc' %]
85 </div>
86 </div>
87 [% INCLUDE 'intranet-bottom.inc' %]