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