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