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