Bug 16946 [Revised] Remove the use of "onclick" from several serials templates
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / serials / checkexpiration.tt
1 [% USE Branches %]
2 [% USE KohaDates %]
3 [% INCLUDE 'doc-head-open.inc' %]
4 <title>Koha &rsaquo; Serials &rsaquo; Check expiration</title>
5 [% INCLUDE 'doc-head-close.inc' %]
6 [% INCLUDE 'calendar.inc' %]
7 <script type="text/javascript" language="JavaScript">
8 // <![CDATA[
9     $(document).ready(function(){
10         $(".renew_subscription").on("click",function(e){
11             e.preventDefault();
12             var subscriptionid = $(this).data("subscriptionid");
13             popup( subscriptionid );
14         });
15     });
16         function popup(subscriptionid) {
17            newin=window.open("subscription-renew.pl?mode=popup&subscriptionid="+subscriptionid,'popup','width=590,height=440,toolbar=false,scrollbars=yes,resize=yes');
18         }
19
20      // ]]>
21 </script>
22 <!-- End of additions -->
23 </head>
24 <body id="ser_checkexpiration" class="ser">
25 [% INCLUDE 'header.inc' %]
26 [% INCLUDE 'serials-search.inc' %]
27
28 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/serials/serials-home.pl">Serials</a> &rsaquo; Check expiration </div>
29
30 <div id="doc3" class="yui-t2">
31    
32    <div id="bd">
33         <div id="yui-main">
34         <div class="yui-b">
35
36 <h1>Check expiration</h1>
37
38     <form name="f" action="/cgi-bin/koha/serials/checkexpiration.pl" method="post" class="validated">
39 <fieldset class="rows">
40     <legend>Filter results:</legend>
41     
42          <ol>
43         <li><label for="title">Title:</label>
44         <input id="title" type="text" name="title" size="15" value="[% title | html %]" /></li>
45
46         <li><label for="issn">ISSN:</label>
47         <input id="issn" type="text" name="issn" size="15" value="[% issn | html %]" /></li>
48         [% IF can_change_library %]
49         <li><label for="branch">Library:</label>
50         <select id="branch" name="branch">
51             <option value="">All</option>
52             [% PROCESS options_for_libraries libraries => Branches.all( selected => branch ) %]
53         </select>
54         </li>
55         [% END %]
56
57         <li><label for="date" class="required">Expiring before:</label>
58             <input id="date" type="text" name="date" size="10" value="[% date | $KohaDates %]" class="required focus datepicker" required="required" />
59         <span class="required">Required</span>
60                         <div class="hint">[% INCLUDE 'date-format.inc' %]</div></li>
61                         </ol>
62         
63 </fieldset>
64 <fieldset class="action"><input type="submit" value="Search" /></fieldset>
65 </form>
66
67 [% IF ( subscriptions_loop ) %]
68 <p>
69     <b>[% numsubscription %]</b> subscription(s)
70         [% IF ( title ) %]
71         with title matching <span class="title">[% title | html %]</class>
72         [% IF ( issn ) %]and [% END %]
73     [% END %]
74     [% IF ( issn ) %]
75         with ISSN matching <b>[% issn | html %]</b>
76     [% END %]
77         will expire before <b>[% date | $KohaDates %]</b>
78 </p>
79 <table>
80         <tr>
81             <th>ISSN</th>
82             <th>Title</th>
83             [% IF can_change_library %]<th>Library</th>[% END %]
84             <th>OPAC note</th>
85             <th>Nonpublic note</th>
86             <th>Expiration date</th>
87             <th>Actions</th>
88         </tr>
89     [% FOREACH subscriptions_loo IN subscriptions_loop %]
90         <tr>
91             <td>
92                 [% subscriptions_loo.issn %]
93             </td>
94             <td><a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% subscriptions_loo.subscriptionid |url %]">[% IF ( subscriptions_loo.title ) %]
95                     [% subscriptions_loo.title |html %]
96                 [% ELSE %]
97                     |
98                 [% END %]
99                 </a>
100             </td>
101             [% IF can_change_library %]<td>
102                 [% Branches.GetName( subscriptions_loo.branchcode ) %]
103             </td>[% END %]
104             <td>
105                 [% subscriptions_loo.notes %]
106             </td>
107             <td>
108                 [% subscriptions_loo.internalnotes %]
109             </td>
110             <td>
111                 [% subscriptions_loo.expirationdate | $KohaDates %]
112             </td>
113             <td class="actions">
114                 <a href="/cgi-bin/koha/serials/subscription-add.pl?op=modify&amp;subscriptionid=[% subscriptions_loo.subscriptionid %]" class="btn btn-mini"><i class="fa fa-pencil"></i> Edit</a>
115                 <a href="/cgi-bin/koha/serials/subscription-renew.pl?subscriptionid=[% subscriptions_loo.subscriptionid %]" data-subscriptionid="[% subscriptions_loo.subscriptionid %]" class="btn btn-mini renew_subscription"><i class="fa fa-refresh"></i> Renew</a>
116             </td>
117         </tr>
118     [% END %]
119     </table>
120 [% ELSIF searched %]
121     <p>No results for your query</p>
122 [% END %]
123
124 </div>
125 </div>
126
127 <div class="yui-b">
128 [% INCLUDE 'serials-menu.inc' %]
129 </div>
130 </div>
131 [% INCLUDE 'intranet-bottom.inc' %]