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