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