Bug 31760: Compiled CSS
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / serials / checkexpiration.tt
1 [% USE Branches %]
2 [% USE KohaDates %]
3 [% SET footerjs = 1 %]
4 [% INCLUDE 'doc-head-open.inc' %]
5 <title>Check expiration &rsaquo; Serials &rsaquo; Koha</title>
6 [% INCLUDE 'doc-head-close.inc' %]
7 </head>
8
9 <body id="ser_checkexpiration" class="ser">
10 [% WRAPPER 'header.inc' %]
11     [% INCLUDE 'serials-search.inc' %]
12 [% END %]
13
14 [% WRAPPER 'sub-header.inc' %]
15 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
16     <ol>
17         <li>
18             <a href="/cgi-bin/koha/mainpage.pl">Home</a>
19         </li>
20         <li>
21             <a href="/cgi-bin/koha/serials/serials-home.pl">Serials</a>
22         </li>
23         <li>
24             <a href="#" aria-current="page">
25                 Check expiration
26             </a>
27         </li>
28     </ol>
29 </nav>
30 [% END %]
31
32 <div class="main container-fluid">
33     <div class="row">
34         <div class="col-sm-10 col-sm-push-2">
35             <main>
36
37 <h1>Check expiration</h1>
38
39     <form name="f" action="/cgi-bin/koha/serials/checkexpiration.pl" method="get" class="validated">
40 <fieldset class="rows">
41     <legend>Filter results:</legend>
42     
43          <ol>
44         <ol>
45         <li><label for="title">Title:</label>
46         <input id="title" type="text" name="title" size="15" value="[% title | html %]" /></li>
47
48         <li><label for="issn">ISSN:</label>
49         <input id="issn" type="text" name="issn" size="15" value="[% issn | html %]" /></li>
50         [% IF can_change_library %]
51         <li><label for="branch">Library:</label>
52         <select id="branch" name="branch">
53             <option value="">All</option>
54             [% PROCESS options_for_libraries libraries => Branches.all( selected => branch ) %]
55         </select>
56         </li>
57         [% END %]
58
59         <li><label for="date" class="required">Expiring before:</label>
60             <input id="date" type="text" name="date" size="10" value="[% date | html %]" class="required focus flatpickr" required="required" />
61         <span class="required">Required</span>
62                         <div class="hint">[% INCLUDE 'date-format.inc' %]</div></li>
63                         </ol>
64
65         <li>
66             <label for="showhistoricexpired">Include expirations before today:</label>
67             [% IF showhistoricexpired %]
68                 <input id="showhistoricexpired" type="checkbox" name="showhistoricexpired" checked="checked" />
69             [% ELSE %]
70                 <input id="showhistoricexpired" type="checkbox" name="showhistoricexpired" />
71             [% END %]
72         </li>
73         </ol>
74 </fieldset>
75 <fieldset class="action"><input type="submit" value="Search" /></fieldset>
76 </form>
77
78 [% IF ( subscriptions_loop ) %]
79 <p>
80     <strong>[% numsubscription | html %]</strong> subscription(s)
81         [% IF ( title ) %]
82         with title matching <span class="title">[% title | html %]</class>
83         [% IF ( issn ) %]and [% END %]
84     [% END %]
85     [% IF ( issn ) %]
86         with ISSN matching <strong>[% issn | html %]</strong>
87     [% END %]
88         will expire before <strong>[% date | $KohaDates %]</strong>
89 </p>
90
91 <div class="checkexpiration-table_table_controls">
92     <a href="#" class="SelectAll"><i class="fa fa-check"></i> Select all</a> |
93     <a href="#" class="ClearAll"><i class="fa fa-remove"></i> Clear all</a>
94     <span class="itemselection_actions">
95       | Actions:
96           <a class="itemselection_action_renew" title="Renew selected subscriptions"><i class="fa fa-refresh"></i> Renew selected subscriptions</a>
97     </span>
98 </div>
99
100
101 <table>
102         <tr>
103             <th></th>
104             <th>ISSN</th>
105             <th>Title</th>
106             [% IF can_change_library %]<th>Library</th>[% END %]
107             <th>OPAC note</th>
108             <th>Nonpublic note</th>
109             <th>Expiration date</th>
110             <th class="noExport">Actions</th>
111         </tr>
112     [% FOREACH subscriptions_loo IN subscriptions_loop %]
113         <tr>
114             <td style="text-align:center;vertical-align:middle">
115                 <input type="checkbox" value="[% subscriptions_loo.subscriptionid | html %]" name="subscriptionid" />
116             </td>
117             <td>
118                 [% subscriptions_loo.issn | html %]
119             </td>
120             <td><a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% subscriptions_loo.subscriptionid |url %]">[% IF ( subscriptions_loo.title ) %]
121                     [% subscriptions_loo.title | html %]
122                 [% ELSE %]
123                     |
124                 [% END %]
125                 </a>
126             </td>
127             [% IF can_change_library %]<td>
128                 [% Branches.GetName( subscriptions_loo.branchcode ) | html %]
129             </td>[% END %]
130             <td>
131                 [% subscriptions_loo.notes | html %]
132             </td>
133             <td>
134                 [% subscriptions_loo.internalnotes | html %]
135             </td>
136             <td>
137                 [% subscriptions_loo.expirationdate | $KohaDates %]
138             </td>
139             <td class="actions">
140                 <a href="/cgi-bin/koha/serials/subscription-add.pl?op=modify&amp;subscriptionid=[% subscriptions_loo.subscriptionid | uri %]" class="btn btn-default btn-xs"><i class="fa fa-pencil"></i> Edit</a>
141                 <a href="/cgi-bin/koha/serials/subscription-renew.pl?subscriptionid=[% subscriptions_loo.subscriptionid | uri %]" data-subscriptionid="[% subscriptions_loo.subscriptionid | html %]" class="btn btn-default btn-xs renew_subscription"><i class="fa fa-refresh"></i> Renew</a>
142             </td>
143         </tr>
144     [% END %]
145     </table>
146 [% ELSIF searched %]
147     <p>No results for your query</p>
148 [% END %]
149
150             </main>
151         </div> <!-- /.col-sm-10.col-sm-push-2 -->
152
153         <div class="col-sm-2 col-sm-pull-10">
154             <aside>
155                 [% INCLUDE 'serials-menu.inc' %]
156             </aside>
157         </div> <!-- /.col-sm-2.col-sm-pull-10 -->
158      </div> <!-- /.row -->
159
160 [% MACRO jsinclude BLOCK %]
161     [% INCLUDE 'calendar.inc' %]
162     <script>
163         $(document).ready(function(){
164             $(".renew_subscription").on("click",function(e){
165                 e.preventDefault();
166                 var subscriptionid = $(this).data("subscriptionid");
167                 newin=window.open("/cgi-bin/koha/serials/subscription-renew.pl?mode=popup&subscriptionid="+subscriptionid,'popup','width=590,height=440,toolbar=false,scrollbars=yes,resize=yes');
168             });
169             $('a.itemselection_action_renew').on("click", function(e){
170                 e.preventDefault();
171                 newin=window.open($(this).attr('href'),'popup','width=590,height=440,toolbar=false,scrollbars=yes,resize=yes');
172             });
173             function itemSelectionBuildRenewLink() {
174                 var subscription_ids= new Array();
175                 $("input[name='subscriptionid'][type='checkbox']:checked").each(function() {
176                     subscription_ids.push($(this).val());
177                 });
178                 if (subscription_ids.length > 0) {
179                     var url = '/cgi-bin/koha/serials/subscription-renew.pl?op=multi_renew';
180                     url += '&subscriptionid=' + subscription_ids.join('&subscriptionid=');
181                     $('a.itemselection_action_renew').attr('href', url);
182                 } else {
183                     return false;
184                 }
185                 return true;
186             }
187
188             function itemSelectionBuildActionLinks() {
189                 var export_link_ok = itemSelectionBuildRenewLink();
190                 if (export_link_ok) {
191                     $('.itemselection_actions').show();
192                 } else {
193                     $('.itemselection_actions').hide();
194                 }
195             }
196
197             itemSelectionBuildActionLinks();
198
199             $("input[name='subscriptionid'][type='checkbox']").change(function() {
200                 itemSelectionBuildActionLinks();
201             });
202
203             $(".SelectAll, .ClearAll").on("click",function(e){
204                 e.preventDefault();
205                 var checkboxes = $(this).parent().siblings('table').first().find('input[type="checkbox"]');
206                 checkboxes.prop('checked', $(this).hasClass('SelectAll'));
207                 itemSelectionBuildActionLinks();
208             });
209
210         });
211     </script>
212 [% END %]
213
214 [% INCLUDE 'intranet-bottom.inc' %]