2 [% USE AuthorisedValues %]
6 [% INCLUDE 'doc-head-open.inc' %]
7 <title>Koha › Serials [% biblionumber %]</title>
8 [% INCLUDE 'doc-head-close.inc' %]
9 [% Asset.css("css/datatables.css") %]
10 <style type="text/css">input.dt-filter { width : 100%; font-size : 85%; }</style>
13 <body id="ser_serials-home" class="ser">
14 [% INCLUDE 'header.inc' %]
15 [% INCLUDE 'serials-search.inc' %]
17 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › [% IF ( done_searched ) %]<a href="/cgi-bin/koha/serials/serials-home.pl">Serials</a> › Search results[% ELSE %]Serials [% END %] </div>
19 <div id="doc3" class="yui-t2">
23 [% INCLUDE 'serials-toolbar.inc' %]
25 [% IF ( done_searched ) %]
26 <h2>Serials subscriptions ([% total %] found)</h2>
28 <h2>Serials subscriptions search</h2>
31 [% UNLESS ( done_searched ) %]
32 <div id="advsearch" style="padding-bottom:3em;">
33 <form action="/cgi-bin/koha/serials/serials-search.pl" method="get">
34 <fieldset class="rows">
35 <legend>Search subscriptions</legend>
38 <label for="issn">ISSN:</label>
39 <input type="text" id="issn" name="ISSN_filter" value="[% ISSN_filter | html %]" />
42 <label for="title">Title:</label>
43 <input type="text" id="title" name="title_filter" value="[% title_filter | html %]" />
45 [% IF ( marcflavour == "UNIMARC" ) %]
47 <label for="ean">EAN:</label>
48 <input type="text" id="ean" name="EAN_filter" value="[% EAN_filter | html %]" />
52 <label for="callnumber">Call number:</label>
53 <input type="text" id="callnumber" name="callnumber_filter" value="[% callnumber_filter | html %]" />
56 <label for="publisher">Publisher:</label>
57 <input type="text" id="publisher" name="publisher_filter" value="[% publisher_filter | html %]" />
60 <label for="bookseller">Vendor:</label>
61 <input type="text" id="bookseller" name="bookseller_filter" value="[% bookseller_filter | html %]" />
64 <label for="branch">Library:</label>
65 <select id="branch" name="branch_filter">
66 <option value="">All</option>
67 [%# FIXME Should not we filter the libraries? %]
68 [% PROCESS options_for_libraries libraries => Branches.all( selected => branch_filter, unfiltered => 1 ) %]
72 <label for="location">Location:</label>
73 [% PROCESS 'av-build-dropbox.inc' name="location_filter", category="LOC", default=location_filter, all=1 %]
76 <label for="to">Expires before:</label>
77 <input type="text" id="to" name="expiration_date_filter" value="[% expiration_date_filter | $KohaDates %]" size="10" maxlength="10" class="datepickerto" />
79 [% FOR field IN additional_fields_for_subscription %]
81 <label for="additional_field_[% field.id %]"> [% field.name %]: </label>
82 [% IF field.authorised_value_choices %]
83 <select id="additional_field_[% field.id %]" name="additional_field_[% field.id %]_filter">
84 <option value="">All</option>
85 [% FOREACH av IN field.authorised_value_choices %]
86 <option value="[% av.authorised_value %]">[% av.lib %]</option>
90 <input id="additional_field_[% field.id %]" type="text" value="[% additional_fields.${field.name} %]" name="additional_field_[% field.id %]_filter" />
95 <input type="hidden" name="searched" value="1" />
96 <fieldset class="action">
97 <input type="submit" value="Search" />
103 [% IF ( done_searched ) %]
105 <div id="serialstabs" class="toptabs" style="clear:both;">
106 <ul class="ui-tabs-nav">
107 <li><a href="#opened">Open ([% openedsubscriptions.size || 0 %])</a></li>
108 <li><a href="#closed">Closed ([% closedsubscriptions.size || 0 %])</a></li>
111 [% IF openedsubscriptions %]
116 <th class="anti-the">Title</th>
121 <th class="title-string">Expiration date</th>
122 [% FOR field IN additional_fields_for_subscription %]
123 <th>[% field.name %]</th>
125 <th class="NoSort">Actions</th>
130 <td><input type="text" class="dt-filter" data-column_num="0" placeholder="Search ISSN" /></td>
131 <td><input type="text" class="dt-filter" data-column_num="1" placeholder="Search title" /></td>
132 <td><input type="text" class="dt-filter" data-column_num="2" placeholder="Search notes" /></td>
133 <td><input type="text" class="dt-filter" data-column_num="3" placeholder="Search library" /></td>
134 <td><input type="text" class="dt-filter" data-column_num="4" placeholder="Search location" /></td>
135 <td><input type="text" class="dt-filter" data-column_num="5" placeholder="Search callnumber" /></td>
136 <td><input type="text" class="dt-filter" data-column_num="6" placeholder="Search expiration date" /></td>
137 [% FOR field IN additional_fields_for_subscription %]
138 <td><input type="text" class="dt-filter" data-column_num="[% loop.count + 6 %]" placeholder="Search [% field.name %]" /></td>
144 [% FOREACH subscription IN openedsubscriptions %]
145 [% UNLESS subscription.cannotdisplay %]
148 [% IF ( subscription.issn ) %][% subscription.issn %]
151 <td><a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% subscription.subscriptionid %]" class="button" title="subscription detail">[% subscription.title |html %]</a>
153 <td>[% IF ( subscription.publicnotes ) %][% subscription.publicnotes %][% END %]
154 [% IF ( subscription.internalnotes ) %]([% subscription.internalnotes %])[% END %]
157 [% IF ( subscription.branchcode ) %][% Branches.GetName( subscription.branchcode ) %][% END %]
160 [% IF ( subscription.location ) %][% AuthorisedValues.GetByCode( 'LOC', subscription.location ) %][% END %]
163 [% IF ( subscription.callnumber ) %][% subscription.callnumber %][% END %]
166 [% IF ( subscription.enddate ) %]
167 <span title="[% subscription.enddate %]">[% subscription.enddate | $KohaDates %]</span>
169 <span title="0000-00-00"></span>
173 [% FOR field IN additional_fields_for_subscription %]
174 [% IF field.authorised_value_category %]
175 <td>[% AuthorisedValues.GetByCode( field.authorised_value_category, subscription.additional_fields.${field.name} ) %]</td>
177 <td>[% subscription.additional_fields.${field.name} %]</td>
182 <div class="dropdown">
183 <div class="btn-group">
184 [% IF ( CAN_user_serials_receive_serials ) %]
185 [%# There should be no space between these two buttons, it would render badly %]
186 <a class="btn btn-default btn-xs" role="button"
187 href="/cgi-bin/koha/serials/serials-edit.pl?subscriptionid=[% subscription.subscriptionid %]&serstatus=1,3,7"><i
188 class="fa fa-inbox"></i> Serial receive</a><a
189 class="btn btn-default btn-xs dropdown-toggle" id="subactions[% subscription.subscriptionid %]" role="button"
190 data-toggle="dropdown" href="#"><b class="caret"></b></a>
192 <a class="btn btn-default btn-xs dropdown-toggle" id="subactions[% subscription.subscriptionid %]" role="button" data-toggle="dropdown" href="#">Actions <b class="caret"></b></a>
194 <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="subactions[% subscription.subscriptionid %]">
196 [% IF ( routing && CAN_user_serials_routing ) %]
197 [% IF ( subscription.cannotedit ) %]
199 [% IF ( subscription.routingedit ) %]
201 <a href="/cgi-bin/koha/serials/routing.pl?subscriptionid=[% subscription.subscriptionid %]"><i class="fa fa-pencil"></i> Edit routing list ([% subscription.routingedit %])</a>
205 <a href="/cgi-bin/koha/serials/routing.pl?subscriptionid=[% subscription.subscriptionid %]&op=new"> <i class="fa fa-plus"></i> New routing list</a>
209 [% END # IF ( routing && CAN_user_serials_routing ) %]
212 <a href="/cgi-bin/koha/serials/serials-collection.pl?subscriptionid=[% subscription.subscriptionid %]"><i class="fa fa-list-alt"></i> Issue history</a>
225 <div class="dialog message">
226 <p>Your search returned no open subscriptions.</p>
231 [% IF closedsubscriptions %]
233 <!-- FIXME add additional_fields for closed subs -->
237 <th class="anti-the">Title</th>
242 [% FOR field IN additional_fields_for_subscription %]
243 <th>[% field.name %]</th>
245 <th class="NoSort">Actions</th>
250 <td><input type="text" class="dt-filter" data-column_num="0" placeholder="Search ISSN" /></td>
251 <td><input type="text" class="dt-filter" data-column_num="1" placeholder="Search title" /></td>
252 <td><input type="text" class="dt-filter" data-column_num="2" placeholder="Search notes" /></td>
253 <td><input type="text" class="dt-filter" data-column_num="3" placeholder="Search library" /></td>
254 <td><input type="text" class="dt-filter" data-column_num="4" placeholder="Search location" /></td>
255 <td><input type="text" class="dt-filter" data-column_num="5" placeholder="Search callnumber" /></td>
256 [% FOR field IN additional_fields_for_subscription %]
257 <td><input type="text" class="dt-filter" data-column_num="[% loop.count + 5 %]" placeholder="Search [% field.name %]" /></td>
263 [% FOREACH subscription IN closedsubscriptions %]
264 [% UNLESS subscription.cannotdisplay %]
267 [% IF ( subscription.issn ) %]
268 [% subscription.issn %]
272 <a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% subscription.subscriptionid %]" class="button" title="subscription detail">[% subscription.title |html %]</a>
275 [% IF ( subscription.notes ) %][% subscription.notes %][% END %]
276 [% IF ( subscription.internalnotes ) %]([% subscription.internalnotes %])[% END %]
279 [% IF ( subscription.branchcode ) %][% Branches.GetName( subscription.branchcode ) %][% END %]
282 [% IF ( subscription.location ) %][% AuthorisedValues.GetByCode( 'LOC', subscription.location ) %][% END %]
285 [% IF ( subscription.callnumber ) %][% subscription.callnumber %][% END %]
287 [% FOR field IN additional_fields_for_subscription %]
288 [% IF field.authorised_value_category %]
289 <td>[% AuthorisedValues.GetByCode( field.authorised_value_category, subscription.additional_fields.${field.name} ) %]</td>
291 <td>[% subscription.additional_fields.${field.name} %]</td>
295 <div class="dropdown">
296 <a class="btn btn-default btn-xs dropdown-toggle" id="closedsubactions[% subscription.subscriptionid %]" role="button" data-toggle="dropdown" href="#">
297 Actions <b class="caret"></b>
299 <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="closedsubactions[% subscription.subscriptionid %]">
301 [% IF ( routing && CAN_user_serials_routing ) %]
302 [% UNLESS ( subscription.cannotedit ) %]
304 <a href="/cgi-bin/koha/serials/serials-search.pl?subscriptionid=[% subscription.subscriptionid %]&op=reopen&routing=[% subscription.routing %]&searched=1&title_filter=[% title_filter | uri %]&ISSN_filter=[% ISSN_filter | uri %]&EAN_filter=[% EAN_filter | uri %]&published_filter=[% publisher_filter | uri %]&bookseller_filter=[% bookseller_filter | uri %]&branch_filter=[% branch_filter | uri %]" id="reopensub"> <i class="fa fa-repeat"></i> Reopen</a>
307 [% END # IF ( routing && CAN_user_serials_routing ) %]
310 <a href="/cgi-bin/koha/serials/serials-collection.pl?subscriptionid=[% subscription.subscriptionid %]"><i class="fa fa-list-alt"></i> Issue history</a>
322 <div class="dialog message">
323 <p>Your search returned no closed subscriptions.</p>
329 <div class="dialog message">
330 <p>Your search returned no results.</p>
338 [% INCLUDE 'serials-menu.inc' %]
339 [% IF ( done_searched ) %]
341 <form action="/cgi-bin/koha/serials/serials-search.pl" method="get">
342 <fieldset class="brief">
343 <h4>Search subscriptions</h4>
346 <label for="issn">ISSN:</label>
347 <input type="text" id="issn" name="ISSN_filter" value="[% ISSN_filter | html %]" />
350 <label for="title">Title:</label>
351 <input type="text" id="title" name="title_filter" value="[% title_filter | html %]" />
353 [% IF ( marcflavour == "UNIMARC" ) %]
355 <label for="ean">EAN:</label>
356 <input type="text" id="ean" name="EAN_filter" value="[% EAN_filter | html %]" />
360 <label for="callnumber">Call number:</label>
361 <input type="text" id="callnumber" name="callnumber_filter" value="[% callnumber_filter | html %]" />
364 <label for="publisher">Publisher:</label>
365 <input type="text" id="publisher" name="publisher_filter" value="[% publisher_filter | html %]" />
368 <label for="bookseller">Vendor:</label>
369 <input type="text" id="bookseller" name="bookseller_filter" value="[% bookseller_filter | html %]" />
372 <label for="branch">Library:</label>
373 <select id="branch" name="branch_filter">
374 <option value="">All</option>
375 [%# FIXME Should not we filter the libraries? %]
376 [% PROCESS options_for_libraries libraries => Branches.all( selected => branch_filter, unfiltered => 1 ) %]
380 <label for="location">Location:</label>
381 [% PROCESS 'av-build-dropbox.inc' name="location_filter", category="LOC", default=location_filter, all=1 %]
384 <label for="to">Expires before:</label>
385 <input type="text" id="to" name="expiration_date_filter" value="[% expiration_date_filter | $KohaDates %]" size="10" maxlength="10" class="datepickerto" />
388 [% FOR field IN additional_fields_for_subscription %]
390 <label for="additional_field_[% field.id %]ID"> [% field.name %]: </label>
391 [% IF field.authorised_value_choices %]
392 <select id="additional_field_[% field.id %]" name="additional_field_[% field.id %]_filter">
393 <option value="">All</option>
394 [% FOREACH av IN field.authorised_value_choices %]
395 [% IF av.authorised_value == additional_field_filters.${field.name}.value %]
396 <option value="[% av.authorised_value %]" selected="selected">[% av.lib %]</option>
398 <option value="[% av.authorised_value %]">[% av.lib %]</option>
403 <input id="additional_field_[% field.id %]" type="text" value="[% additional_field_filters.${field.name}.value %]" name="additional_field_[% field.id %]_filter" />
408 <input type="hidden" name="searched" value="1" />
409 <fieldset class="action">
410 <input type="submit" value="Search" />
419 [% MACRO jsinclude BLOCK %]
420 [% INCLUDE 'calendar.inc' %]
421 [% INCLUDE 'datatables.inc' %]
422 <script type="text/javascript">
423 var subscriptionid = "[% subscriptionid %]";
424 var MSG_CLOSE_SUBSCRIPTION = _("Are you sure you want to close this subscription?");
425 var MSG_REOPEN_SUBSCRIPTION = _("Are you sure you want to reopen this subscription?");
426 var CONFIRM_DELETE_SUBSCRIPTION = _("Are you sure you want to delete this subscription?");
428 [% Asset.js("js/serials-toolbar.js") %]
429 <script type="text/javascript">
430 $(document).ready(function() {
431 var osrlt = $("#osrlt").dataTable($.extend(true, {}, dataTablesDefaults, {
432 "sPaginationType": "four_button",
434 { 'bSortable': false, "bSearchable": false, 'aTargets': [ 'NoSort' ] },
435 { "sType": "title-string", "aTargets" : [ "title-string" ] },
436 { 'sType': "anti-the", 'aTargets' : [ 'anti-the'] }
440 var csrlt = $("#csrlt").dataTable($.extend(true, {}, dataTablesDefaults, {
441 // FIXME sort function of additional_fields!
442 "sPaginationType": "four_button",
444 { 'bSortable': false, 'aTargets': [ 'NoSort' ] },
445 { 'sType': "anti-the", 'aTargets' : [ 'anti-the'] }
449 osrlt.fnAddFilters("dt-filter", 750);
450 csrlt.fnAddFilters("dt-filter", 750);
452 $('#serialstabs').tabs();
453 $("#reopensub").click(function(){
454 return confirm(_("Are you sure you want to reopen this subscription?"));
460 [% INCLUDE 'intranet-bottom.inc' %]