Bug 11265: ensure current locale is selected when editing a subscription
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / serials / serials-search.tt
1 [% USE Branches %]
2 [% INCLUDE 'doc-head-open.inc' %]
3 [% USE KohaDates %]
4 <title>Koha &rsaquo; Serials [% biblionumber %]</title>
5 <link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
6 [% INCLUDE 'doc-head-close.inc' %]
7 <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.dataTables.min.js"></script>
8 [% INCLUDE 'datatables-strings.inc' %]
9 <script type="text/javascript" src="[% themelang %]/js/datatables.js"></script>
10 <script type="text/javascript">
11 //<![CDATA[
12  $(document).ready(function() {
13     [% IF (dateformat == 'metric') %]
14         dt_add_type_uk_date();
15     [% END %]
16     var osrlt = $("#osrlt").dataTable($.extend(true, {}, dataTablesDefaults, {
17
18         "aoColumnDefs": [
19             { "aTargets": [ -1, -2, -3 ], "bSortable": false, "bSearchable": false },
20         ],
21         "sPaginationType": "four_button"
22     } ) );
23
24     var csrlt = $("#csrlt").dataTable($.extend(true, {}, dataTablesDefaults, {
25         "aoColumnDefs": [
26             { "aTargets": [ -1, -2 ], "bSortable": false, "bSearchable": false },
27         ],
28         "sPaginationType": "four_button"
29     } ) );
30
31     osrlt.fnAddFilters("filter", 750);
32     csrlt.fnAddFilters("filter", 750);
33
34     $('#serialstabs').tabs();
35     $("#reopensub").click(function(){
36       return confirm(_("Are you sure you want to reopen this subscription?"));
37     });
38  });
39  //]]>
40 </script>
41 </head>
42 <body id="ser_serials-home" class="ser">
43 [% INCLUDE 'header.inc' %]
44 [% INCLUDE 'serials-search.inc' %]
45
46 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; [% IF ( done_searched ) %]<a href="/cgi-bin/koha/serials/serials-home.pl">Serials</a> &rsaquo; Search results[% ELSE %]Serials [% END %] </div>
47
48 <div id="doc3" class="yui-t2">
49   <div id="bd">
50     <div id="yui-main">
51       <div class="yui-b">
52       [% INCLUDE 'serials-toolbar.inc' %]
53
54       <h2>Serials subscriptions ([% total %] found)</h2>
55       [% UNLESS ( done_searched ) %]
56       <div id="advsearch" style="padding-bottom:3em;">
57         <form action="/cgi-bin/koha/serials/serials-search.pl" method="get">
58           <fieldset class="rows">
59           <legend>Search subscriptions</legend>
60               <ol>
61                 <li>
62                   <label for="issn">ISSN:</label>
63                   <input type="text" id="issn" name="ISSN_filter" value="[% ISSN_filter %]" />
64                 </li>
65                 <li>
66                   <label for="title">Title:</label>
67                   <input type="text" id="title" name="title_filter" value="[% title_filter %]" />
68                 </li>
69                 [% IF ( marcflavour == "UNIMARC" ) %]
70                 <li>
71                   <label for="ean">EAN:</label>
72                   <input type="text" id="ean" name="EAN_filter" value="[% EAN_filter %]" />
73                 </li>
74                 [% END %]
75                 <li>
76                   <label for="publisher">Publisher:</label>
77                   <input type="text" id="publisher" name="publisher_filter" value="[% publisher_filter %]" />
78                 </li>
79                 <li>
80                   <label for="bookseller">Vendor:</label>
81                   <input type="text" id="bookseller" name="bookseller_filter" value="[% bookseller_filter %]" />
82                 </li>
83                 <li>
84                   <label for="branch">Library:</label>
85                   <select id="branch" name="branch_filter">
86                     <option value="">All</option>
87                     [% FOREACH branch IN branches_loop %]
88                       [% IF ( branch.selected ) %]
89                         <option selected="selected" value="[% branch.branchcode %]">[% branch.branchname %]</option>
90                       [% ELSE %]
91                         <option value="[% branch.branchcode %]">[% branch.branchname %]</option>
92                       [% END %]
93                     [% END %]
94                   </select>
95                 </li>
96               </ol>
97               <input type="hidden" name="searched" value="1" />
98               <fieldset class="action">
99                 <input type="submit" value="Search" />
100               </fieldset>
101           </fieldset>
102         </form>
103       </div>
104       [% END %]
105       [% IF ( done_searched ) %]
106         [% IF ( total ) %]
107           <div id="serialstabs" class="toptabs" style="clear:both;">
108             <ul class="ui-tabs-nav">
109               <li><a href="#opened">Open ([% openedsubscriptions.size || 0 %])</a></li>
110               <li><a href="#closed">Closed ([% closedsubscriptions.size || 0 %])</a></li>
111             </ul>
112             <div id="opened">
113               [% IF openedsubscriptions %]
114                 <table id="osrlt">
115                   <thead>
116                     <tr>
117                         <th>ISSN</th>
118                         <th>Title</th>
119                         <th> Notes </th>
120                         <th>Library</th>
121                         <th>Call number</th>
122                         <th>Expiration date</th>
123                         [% IF ( routing && CAN_user_serials_routing ) %]
124                           <th>Routing list</th>
125                         [% END %]
126                         <th>&nbsp;</th>
127                         <th>&nbsp;</th>
128                     </tr>
129                   </thead>
130                   <tfoot>
131                     <tr>
132                       <td><input type="text" class="filter" data-column_num="0" placeholder="Search ISSN" /></td>
133                       <td><input type="text" class="filter" data-column_num="1" placeholder="Search title" /></td>
134                       <td><input type="text" class="filter" data-column_num="2" placeholder="Search notes" /></td>
135                       <td><input type="text" class="filter" data-column_num="3" placeholder="Search library" /></td>
136                       <td><input type="text" class="filter" data-column_num="4" placeholder="Search callnumber" /></td>
137                       <td><input type="text" class="filter" data-column_num="5" placeholder="Search expiration date" /></td>
138                       [% IF ( routing && CAN_user_serials_routing ) %]<td></td>[% END %]
139                       <td></td>
140                       <td></td>
141                     </tr>
142                   </tfoot>
143                   <tbody>
144                     [% FOREACH subscription IN openedsubscriptions %]
145                     [% UNLESS subscription.cannotdisplay %]
146                       <tr>
147                         <td>
148                         [% IF ( subscription.issn ) %][% subscription.issn %]
149                         [% END %]
150                         </td>
151                         <td><a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% subscription.subscriptionid %]" class="button" title="subscription detail">[% subscription.title |html %]</a>
152                         </td>
153                         <td>[% IF ( subscription.publicnotes ) %][% subscription.publicnotes %][% END %]
154                         [% IF ( subscription.internalnotes ) %]([% subscription.internalnotes %])[% END %]
155                         </td>
156                         <td>
157                           [% IF ( subscription.branchcode ) %][% Branches.GetName( subscription.branchcode ) %][% END %]
158                         </td>
159                         <td>
160                           [% IF ( subscription.callnumber ) %][% subscription.callnumber %][% END %]
161                         </td>
162                         <td>
163                           [% IF ( subscription.enddate ) %][% subscription.enddate | $KohaDates %][% END %]
164                         </td>
165                         [% IF ( routing && CAN_user_serials_routing ) %]
166                         <td>
167                           [% IF ( subscription.cannotedit ) %]
168                             &nbsp;
169                           [% ELSE %]
170                             [% IF ( subscription.routingedit ) %]
171                               <a href="/cgi-bin/koha/serials/routing.pl?subscriptionid=[% subscription.subscriptionid %]">Edit</a>
172                               ([% subscription.routingedit %])
173                             [% ELSE %]
174                               <a href="/cgi-bin/koha/serials/routing.pl?subscriptionid=[% subscription.subscriptionid %]&amp;op=new">New</a>
175                             [% END %]
176                           [% END %]
177                         </td>
178                         [% END %]
179                         <td><a href="/cgi-bin/koha/serials/serials-collection.pl?subscriptionid=[% subscription.subscriptionid %]">Issue history</a>
180                         </td>
181                         <td>
182                         [% IF ( CAN_user_serials_receive_serials ) %]
183                           <a href="/cgi-bin/koha/serials/serials-edit.pl?subscriptionid=[% subscription.subscriptionid %]&amp;serstatus=1,3,7">Serial receive</a>
184                         [% END %]
185                         </td>
186                       </tr>
187                       [% END %]
188                     [% END %]
189                   </tbody>
190                 </table>
191               [% ELSE %]
192                 <div class="dialog message">
193                   <p>Your search returned no open subscriptions.</p>
194                 </div>
195               [% END %]
196             </div>
197             <div id="closed">
198               [% IF closedsubscriptions %]
199                 <table id="csrlt">
200                   <thead>
201                     <tr>
202                         <th>ISSN</th>
203                         <th>Title</th>
204                         <th> Notes </th>
205                         <th>Library</th>
206                         <th>Call number</th>
207                         <th>&nbsp;</th>
208                         <th>&nbsp;</th>
209                     </tr>
210                   </thead>
211                   <tfoot>
212                     <tr>
213                       <td><input type="text" class="filter" data-column_num="0" placeholder="Search ISSN" /></td>
214                       <td><input type="text" class="filter" data-column_num="1" placeholder="Search title" /></td>
215                       <td><input type="text" class="filter" data-column_num="2" placeholder="Search notes" /></td>
216                       <td><input type="text" class="filter" data-column_num="3" placeholder="Search library" /></td>
217                       <td><input type="text" class="filter" data-column_num="4" placeholder="Search callnumber" /></td>
218                       <td></td>
219                       <td></td>
220                     </tr>
221                   </tfoot>
222                   <tbody>
223                     [% FOREACH subscription IN closedsubscriptions %]
224                     [% UNLESS subscription.cannotdisplay %]
225                       <tr>
226                         <td>
227                           [% IF ( subscription.issn ) %]
228                             [% subscription.issn %]
229                           [% END %]
230                         </td>
231                         <td>
232                           <a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% subscription.subscriptionid %]" class="button" title="subscription detail">[% subscription.title |html %]</a>
233                         </td>
234                         <td>
235                           [% IF ( subscription.notes ) %][% subscription.notes %][% END %]
236                           [% IF ( subscription.internalnotes ) %]([% subscription.internalnotes %])[% END %]
237                         </td>
238                         <td>
239                           [% IF ( subscription.branchcode ) %][% Branches.GetName( subscription.branchcode ) %][% END %]
240                         </td>
241                         <td>
242                           [% IF ( subscription.callnumber ) %][% subscription.callnumber %][% END %]
243                         </td>
244                         <td>
245                           [% UNLESS subscription.cannotedit %]
246                             <a href="/cgi-bin/koha/serials/serials-search.pl?subscriptionid=[% subscription.subscriptionid %]&amp;op=reopen&amp;routing=[% subscription.routing %]&amp;searched=1&amp;title_filter=[% title_filter %]&amp;ISSN_filter=[% ISSN_filter %]&amp;EAN_filter=[% EAN_filter %]&amp;published_filter=[% publisher_filter %]&amp;bookseller_filter=[% bookseller_filter %]&amp;branch_filter=[% branch_filter %]" id="reopensub">Reopen</a>
247                           [% ELSE %]
248                             Cannot edit
249                           [% END %]
250                         </td>
251                         <td>
252                           <a href="/cgi-bin/koha/serials/serials-collection.pl?subscriptionid=[% subscription.subscriptionid %]">Issue history</a>
253                         </td>
254                       </tr>
255                     [% END %]
256                     [% END %]
257                   </tbody>
258                 </table>
259               [% ELSE %]
260                 <div class="dialog message">
261                   <p>Your search returned no closed subscriptions.</p>
262                 </div>
263               [% END %]
264             </div>
265           </div>
266         [% ELSE %]
267             <div class="dialog message">
268               <p>Your search returned no results.</p>
269             </div>
270         [% END %]
271       [% END %]
272     </div>
273   </div>
274
275   <div class="yui-b">
276     [% INCLUDE 'serials-menu.inc' %]
277     [% IF ( done_searched ) %]
278     <div id="advsearch">
279         <form action="/cgi-bin/koha/serials/serials-search.pl" method="get">
280           <fieldset class="brief">
281             <h4>Search subscriptions</h4>
282               <ol>
283                 <li>
284                   <label for="issn">ISSN:</label>
285                   <input type="text" id="issn" name="ISSN_filter" value="[% ISSN_filter %]" />
286                 </li>
287                 <li>
288                   <label for="title">Title:</label>
289                   <input type="text" id="title" name="title_filter" value="[% title_filter %]" />
290                 </li>
291                 [% IF ( marcflavour == "UNIMARC" ) %]
292                 <li>
293                   <label for="ean">EAN:</label>
294                   <input type="text" id="ean" name="EAN_filter" value="[% EAN_filter %]" />
295                 </li>
296                 [% END %]
297                 <li>
298                   <label for="publisher">Publisher:</label>
299                   <input type="text" id="publisher" name="publisher_filter" value="[% publisher_filter %]" />
300                 </li>
301                 <li>
302                   <label for="bookseller">Vendor:</label>
303                   <input type="text" id="bookseller" name="bookseller_filter" value="[% bookseller_filter %]" />
304                 </li>
305                 <li>
306                   <label for="branch">Library:</label>
307                   <select id="branch" name="branch_filter">
308                     <option value="">All</option>
309                     [% FOREACH branch IN branches_loop %]
310                       [% IF ( branch.selected ) %]
311                         <option selected="selected" value="[% branch.branchcode %]">[% branch.branchname %]</option>
312                       [% ELSE %]
313                         <option value="[% branch.branchcode %]">[% branch.branchname %]</option>
314                       [% END %]
315                     [% END %]
316                   </select>
317                 </li>
318               </ol>
319               <input type="hidden" name="searched" value="1" />
320               <fieldset class="action">
321                 <input type="submit" value="Search" />
322               </fieldset>
323             </div>
324           </fieldset>
325         </form>
326       [% END %]
327   </div>
328 </div>
329 [% INCLUDE 'intranet-bottom.inc' %]