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