Bug 24958: Remember last selected tab in SQL reports
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / reports / serials_stats.tt
1 [% USE raw %]
2 [% USE Asset %]
3 [% USE KohaDates %]
4 [% USE Branches %]
5 [% SET footerjs = 1 %]
6 [% INCLUDE 'doc-head-open.inc' %]
7 <title>Koha &rsaquo; Reports &rsaquo; Serials subscriptions stats</title>
8 [% INCLUDE 'doc-head-close.inc' %]
9 <style>
10         .sql {display: none;}
11 </style>
12 </head>
13
14 <body id="rep_serials_stats" 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> &rsaquo; Serials subscriptions stats</div>
19
20 <div class="main container-fluid">
21     <div class="row">
22         <div class="col-sm-10 col-sm-push-2">
23             <main>
24
25         <h1>Serials subscriptions</h1>
26 [% IF ( do_it ) %]
27         <table id="resulttable">
28                 <thead>
29                         <tr>
30                                 <th>Vendor</th>
31                                 <th>Title</th>
32                 <th>Subscription ID</th>
33                 <th>Library</th>
34                 <th>Call number</th>
35                 <th>Subscription begin</th>
36                 <th>Subscription end</th>
37                 <th>Expired? / Closed?</th>
38                         </tr>
39                 </thead>
40                 <tbody>
41                         <tr>
42                                 [% FOREACH data IN datas %]
43                     <td><a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% data.aqbooksellerid | uri %]">[% data.name | html %]</a></td>
44                     <td><a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% data.subscriptionid | uri %]">[% data.title | html %]</a></td>
45                                         <td>[% data.subscriptionid | html %]</td>
46                     <td>[% Branches.GetName( data.branchcode ) | html %]</td>
47                                         <td>[% data.callnumber | html %]</td>
48                     <td><span title="[% data.startdate | html %]">[% data.startdate | $KohaDates %]</span></td>
49                     <td><span title="[% data.enddate | html %]">[% data.enddate | $KohaDates %]</span></td>
50                     <td>
51                         [% IF data.closed %]
52                             Closed
53                         [% ELSIF data.expired %]
54                             Expired
55                         [% END %]
56                     </td>
57                                 </tr>
58                                 [% END %]
59                         </tr>
60                 </tbody>
61         </table>
62
63 [% ELSE %]
64         <form method="post" action="/cgi-bin/koha/reports/serials_stats.pl">
65
66         <fieldset class="rows">
67                 <ol>
68                         <li>
69
70                                 <label for="bookseller">
71                                         Vendor:
72                             </label>
73                                 <select name="bookseller" id="bookseller">
74                     <option value="">Any vendor</option>
75                                 [% FOREACH bookseller IN booksellers %]
76                                                 <option value="[% bookseller.aqbooksellerid | html %]">[% bookseller.name | html %]</option>
77                                         [% END %]
78                             </select>
79                         </li><li>
80                 <label for="branchcode">
81                                         Library:
82                         </label>
83                         <select name="branchcode"  id="branchcode">
84                                 <option value="">Any library</option>
85                 [% PROCESS options_for_libraries libraries => Branches.all() %]
86                         </select>
87
88                     </li>
89                     <li>
90                         <label for="expired">Include expired subscriptions: </label>
91                 <input type="checkbox" name="expired" id="expired" />
92                     </li>
93                 </ol>
94         </fieldset>
95
96
97         <fieldset class="rows">
98         <legend>Output</legend>
99     <ol>
100         <li>
101             <label for="outputscreen">To screen into the browser: </label><input type="radio" checked="checked" name="output" id="outputscreen" value="screen" />
102         </li>
103         <li>
104             <label for="outputfile">To a file:</label> <input type="radio" name="output" value="file" id="outputfile" />
105             <label class="inline" for="basename">Named: </label><input type="text" name="basename" id="basename" value="Export" />
106             <label class="inline" for="MIME">Into an application:</label>
107             <select name="MIME" id="MIME" size="1">
108             [% FOREACH value IN CGIextChoice %]
109                 <option value="[% value | html %]">[% value | html %]</option>
110             [% END %]
111             </select>
112             <select name="sep" id="sep" size="1">
113             [% FOREACH value IN CGIsepChoice.values.sort() %]
114               [% IF ( value == CGIsepChoice.default ) %]
115                 <option value="[% value | html %]" selected="selected">[% value | html %]</option>
116               [% ELSE %]
117                 <option value="[% value | html %]">[% value | html %]</option>
118               [% END %]
119             [% END %]
120             </select>
121         </li>
122     </ol>
123         </fieldset>
124
125         <fieldset class="action">
126         <input type="submit" value="Submit" />
127         <input type="hidden" name="report_name" value="[% report_name | html %]" />
128         <input type="hidden" name="do_it" value="1" />
129         </fieldset>
130         </form>
131 [% END %]
132
133             </main>
134         </div> <!-- /.col-sm-10.col-sm-push-2 -->
135
136         <div class="col-sm-2 col-sm-pull-10">
137             <aside>
138                 [% INCLUDE 'reports-menu.inc' %]
139             </aside>
140         </div> <!-- /.col-sm-2.col-sm-pull-10 -->
141      </div> <!-- /.row -->
142
143 [% MACRO jsinclude BLOCK %]
144 [% INCLUDE 'datatables.inc' %]
145     <script>
146         $(document).ready(function() {
147             $("#resulttable").dataTable($.extend(true, {}, dataTablesDefaults, {
148                 "sDom": 't',
149                 "bPaginate": false,
150                 "aoColumns": [
151                     null,{ "sType": "anti-the" },null,null,null,{ "sType": "title-string" },{ "sType": "title-string" },null
152                 ],
153             }));
154         });
155     </script>
156 [% END %]
157
158 [% INCLUDE 'intranet-bottom.inc' %]