Bug 9467 - Use DataTables on catalog by item type report page
[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="/intranet-tmpl/prog/en/css/datatables.css" />
6 <script type="text/javascript" src="/intranet-tmpl/prog/en/lib/jquery/plugins/jquery.dataTables.min.js"></script>
7 [% INCLUDE 'datatables-strings.inc' %]
8 <script type="text/javascript" src="/intranet-tmpl/prog/en/js/datatables.js"></script>
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 ( mainloo.branchname ) %] held at [% mainloo.branchname %][% 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>[% 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"><ol><li><label for="value">Select a library</label> [% CGIbranch %]
63                 <span class="tip">Select none to see all libraries</span></li></ol></fieldset>
64                 <fieldset class="action"><input type="submit" value="Submit" />
65                 <input type="hidden" name="report_name" value="[% report_name %]" />
66                 <input type="hidden" name="do_it" value="1" /></fieldset>
67         </form>
68 [% END %]
69
70 </div>
71 </div>
72 <div class="yui-b">
73 [% INCLUDE 'reports-menu.inc' %]
74 </div>
75 </div>
76 [% INCLUDE 'intranet-bottom.inc' %]