Bug 14790 [QA Followup] - Don't show links unless OPACBaseURL is set
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / serials / checkexpiration.tt
1 [% USE KohaDates %]
2 [% INCLUDE 'doc-head-open.inc' %]
3 <title>Koha &rsaquo; Serials &rsaquo; Check expiration</title>
4 [% INCLUDE 'doc-head-close.inc' %]
5 [% INCLUDE 'calendar.inc' %]
6 [% USE Branches %]
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 %]" /></li>
53
54         <li><label for="issn">ISSN:</label>
55         <input id="issn" type="text" name="issn" size="15" value="[% issn %]" /></li>
56         [% IF (branches_loop.size) %]
57         <li><label for="branch">Library:</label>
58         <select id="branch" name="branch">
59             <option value="">All</option>
60             [% FOREACH branch IN branches_loop %]
61                 [% IF branch.selected %]
62                     <option selected="selected" value="[% branch.branchcode %]">
63                 [% ELSE %]
64                     <option value="[% branch.branchcode %]">
65                 [% END %]
66                     [% branch.branchname %]
67                 </option>
68             [% END %]
69         </select>
70         </li>
71         [% END %]
72
73         <li><label for="date" class="required" title="Required field">Expiring before:</label>
74         <input id="date" type="text" name="date" size="10" value="[% date | $KohaDates %]" class="focus datepicker" />
75         <span class="required">Required</span>
76                         <div class="hint">[% INCLUDE 'date-format.inc' %]</div></li>
77                         </ol>
78         
79 </fieldset>
80 <fieldset class="action"><input type="submit" value="Search" /></fieldset>
81 </form>
82
83 [% IF ( subscriptions_loop ) %]
84 <p>
85     <b>[% numsubscription %]</b> subscription(s)
86         [% IF ( title ) %]
87         with title matching <span class="title">[% title %]</class>
88         [% IF ( issn ) %]and [% END %]
89     [% END %]
90     [% IF ( issn ) %]
91         with ISSN matching <b>[% issn %]</b>
92     [% END %]
93         will expire before <b>[% date | $KohaDates %]</b>
94 </p>
95 <table>
96         <tr>
97             <th>ISSN</th>
98             <th>Title</th>
99             [% IF ( branches_loop.size ) %]<th>Library</th>[% END %]
100             <th>OPAC note</th>
101             <th>Nonpublic note</th>
102             <th>Expiration date</th>
103             <th>Actions</th>
104         </tr>
105     [% FOREACH subscriptions_loo IN subscriptions_loop %]
106         <tr>
107             <td>
108                 [% subscriptions_loo.issn %]
109             </td>
110             <td><a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% subscriptions_loo.subscriptionid |url %]">[% IF ( subscriptions_loo.title ) %]
111                     [% subscriptions_loo.title |html %]
112                 [% ELSE %]
113                     |
114                 [% END %]
115                 </a>
116             </td>
117             [% IF ( branches_loop.size ) %]<td>
118                 [% Branches.GetName( subscriptions_loo.branchcode ) %]
119             </td>[% END %]
120             <td>
121                 [% subscriptions_loo.notes %]
122             </td>
123             <td>
124                 [% subscriptions_loo.internalnotes %]
125             </td>
126             <td>
127                 [% subscriptions_loo.expirationdate | $KohaDates %]
128             </td>
129             <td class="actions">
130                 <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>
131                 <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>
132             </td>
133         </tr>
134     [% END %]
135     </table>
136 [% ELSIF searched %]
137     <p>No results for your query</p>
138 [% END %]
139
140 </div>
141 </div>
142
143 <div class="yui-b">
144 [% INCLUDE 'serials-menu.inc' %]
145 </div>
146 </div>
147 [% INCLUDE 'intranet-bottom.inc' %]