Bug 15758: [QA Follow-up] Final touch?
[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     /**
10      *  Function CheckForm
11      *  This function checks the form before submit
12      */
13      function CheckForm(form){
14         if(form.date.value){
15             return true;
16         }
17         else {
18             alert(_("You must enter a date!"));
19             document.f.date.focus();
20             return false;
21         }
22      }
23
24         function popup(subscriptionid) {
25            newin=window.open("subscription-renew.pl?mode=popup&subscriptionid="+subscriptionid,'popup','width=590,height=440,toolbar=false,scrollbars=yes,resize=yes');
26         }
27
28      // ]]>
29 </script>
30 <!-- End of additions -->
31 </head>
32 <body id="ser_checkexpiration" class="ser">
33 [% INCLUDE 'header.inc' %]
34 [% INCLUDE 'serials-search.inc' %]
35
36 <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>
37
38 <div id="doc3" class="yui-t2">
39    
40    <div id="bd">
41         <div id="yui-main">
42         <div class="yui-b">
43
44 <h1>Check expiration</h1>
45
46     <form name="f" action="/cgi-bin/koha/serials/checkexpiration.pl" method="post" onsubmit="return CheckForm(this);">
47 <fieldset class="rows">
48     <legend>Filter results:</legend>
49     
50          <ol>
51         <li><label for="title">Title:</label>
52         <input id="title" type="text" name="title" size="15" value="[% title | html %]" /></li>
53
54         <li><label for="issn">ISSN:</label>
55         <input id="issn" type="text" name="issn" size="15" value="[% issn | html %]" /></li>
56         [% IF can_change_library %]
57         <li><label for="branch">Library:</label>
58         <select id="branch" name="branch">
59             <option value="">All</option>
60             [% PROCESS options_for_libraries libraries => Branches.all( selected => branch ) %]
61         </select>
62         </li>
63         [% END %]
64
65         <li><label for="date" class="required" title="Required field">Expiring before:</label>
66         <input id="date" type="text" name="date" size="10" value="[% date | $KohaDates %]" class="focus datepicker" />
67         <span class="required">Required</span>
68                         <div class="hint">[% INCLUDE 'date-format.inc' %]</div></li>
69                         </ol>
70         
71 </fieldset>
72 <fieldset class="action"><input type="submit" value="Search" /></fieldset>
73 </form>
74
75 [% IF ( subscriptions_loop ) %]
76 <p>
77     <b>[% numsubscription %]</b> subscription(s)
78         [% IF ( title ) %]
79         with title matching <span class="title">[% title | html %]</class>
80         [% IF ( issn ) %]and [% END %]
81     [% END %]
82     [% IF ( issn ) %]
83         with ISSN matching <b>[% issn | html %]</b>
84     [% END %]
85         will expire before <b>[% date | $KohaDates %]</b>
86 </p>
87 <table>
88         <tr>
89             <th>ISSN</th>
90             <th>Title</th>
91             [% IF can_change_library %]<th>Library</th>[% END %]
92             <th>OPAC note</th>
93             <th>Nonpublic note</th>
94             <th>Expiration date</th>
95             <th>Actions</th>
96         </tr>
97     [% FOREACH subscriptions_loo IN subscriptions_loop %]
98         <tr>
99             <td>
100                 [% subscriptions_loo.issn %]
101             </td>
102             <td><a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% subscriptions_loo.subscriptionid |url %]">[% IF ( subscriptions_loo.title ) %]
103                     [% subscriptions_loo.title |html %]
104                 [% ELSE %]
105                     |
106                 [% END %]
107                 </a>
108             </td>
109             [% IF can_change_library %]<td>
110                 [% Branches.GetName( subscriptions_loo.branchcode ) %]
111             </td>[% END %]
112             <td>
113                 [% subscriptions_loo.notes %]
114             </td>
115             <td>
116                 [% subscriptions_loo.internalnotes %]
117             </td>
118             <td>
119                 [% subscriptions_loo.expirationdate | $KohaDates %]
120             </td>
121             <td class="actions">
122                 <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>
123                 <a href="/cgi-bin/koha/serials/subscription-renew.pl?subscriptionid=[% subscriptions_loo.subscriptionid %]" onclick="popup([% subscriptions_loo.subscriptionid %]); return false;" class="btn btn-mini"><i class="fa fa-refresh"></i> Renew</a>
124             </td>
125         </tr>
126     [% END %]
127     </table>
128 [% ELSIF searched %]
129     <p>No results for your query</p>
130 [% END %]
131
132 </div>
133 </div>
134
135 <div class="yui-b">
136 [% INCLUDE 'serials-menu.inc' %]
137 </div>
138 </div>
139 [% INCLUDE 'intranet-bottom.inc' %]