3 [% USE AuthorisedValues %]
9 [% INCLUDE 'doc-head-open.inc' %]
10 <title>Serials [% biblionumber | html %] › Koha</title>
11 [% INCLUDE 'doc-head-close.inc' %]
12 <style>input.dt-filter { width : 100%; font-size : 85%; }</style>
15 <body id="ser_serials-search" class="ser">
16 [% WRAPPER 'header.inc' %]
17 [% INCLUDE 'serials-search.inc' %]
20 [% WRAPPER 'sub-header.inc' %]
21 [% WRAPPER breadcrumbs %]
22 [% IF ( done_searched ) %]
23 [% WRAPPER breadcrumb_item %]
24 <a href="/cgi-bin/koha/serials/serials-home.pl">Serials</a>
26 [% WRAPPER breadcrumb_item bc_active= 1 %]
27 <span>Search results</span>
30 [% WRAPPER breadcrumb_item bc_active= 1 %]
34 [% END #/ WRAPPER breadcrumbs %]
35 [% END #/ WRAPPER sub-header.inc %]
38 [% FOREACH param IN CGI.params.pairs %]
39 [% escaped_value = BLOCK %][% param.value | uri %][% END %]
40 [% url_params.push(param.key _ '=' _ escaped_value) %]
43 [% SET referrer = '/cgi-bin/koha/serials/serials-search.pl?' %]
44 [% referrer = BLOCK %][% referrer | url %][% url_params.join("&") |uri %][% END %]
45 [% SET edit_action_link = '/cgi-bin/koha/serials/subscription-batchedit.pl?referrer=' _ referrer %]
47 [% BLOCK subscriptions_table %]
50 [% SET tab = 'closed' %]
52 [% SET tab = 'opened' %]
54 [% IF CAN_user_serials_edit_subscription %]
56 <a class="select-all" href="#" data-tab="[% tab | html %]"><i class="fa fa-check"></i> Select all</a>
58 <a class="clear-all" href="#" data-tab="[% tab | html %]"><i class="fa fa-times"></i> Clear all</a>
59 <span class="itemselection_actions [% tab | html %]">
61 <a href="#" data-tab="[% tab | html %]" class="itemselection_action_modify"><i class="fa-solid fa-pencil" aria-hidden="true"></i> Edit selected serials</a>
68 <th class="NoSort noExport"></th>
70 <th class="anti-the">Title</th>
76 <th>Expiration date</th>
78 [% FOR field IN additional_fields_for_subscription %]
79 <th>[% field.name | html %]</th>
81 <th class="NoSort noExport">Actions</th>
85 [% FOREACH subscription IN subscriptions %]
86 [% UNLESS subscription.cannotdisplay %]
89 [% UNLESS subscription.cannotedit %]
90 <input type="checkbox" name="subscriptionid" value="[% subscription.subscriptionid | html %]" class="[% tab | html %]" />
92 <input type="checkbox" name="subscriptionid" value="[% subscription.subscriptionid | html %]" disabled="disabled" title="You cannot edit this subscription" />
96 [% IF ( subscription.issn ) %]
97 [% subscription.issn | html %]
101 <a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% subscription.subscriptionid | uri %]" class="button" title="subscription detail">[% subscription.title | html %] [% subscription.subtitle | html %] [% subscription.part_number | html %] [%subscription.part_name | html %]</a>
104 [% IF ( subscription.publicnotes ) %][% subscription.publicnotes | html %][% END %]
105 [% IF ( subscription.internalnotes ) %]([% subscription.internalnotes | html %])[% END %]
108 [% IF ( subscription.branchcode ) %][% Branches.GetName( subscription.branchcode ) | html %][% END %]
111 [% IF ( subscription.location ) %]
112 [% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => subscription.location ) | html %]
116 [% IF ( subscription.callnumber ) %][% subscription.callnumber | html %][% END %]
119 <td data-order="[% subscription.enddate | html %]">
120 [% subscription.enddate | $KohaDates %]
124 [% FOR field IN additional_fields_for_subscription %]
125 [% IF field.authorised_value_category %]
126 <td>[% AuthorisedValues.GetByCode( field.authorised_value_category, subscription.additional_fields.${field.name} ) | html %]</td>
128 <td>[% subscription.additional_fields.${field.name} | html %]</td>
133 <div class="btn-group dropup">
135 <a class="btn btn-default btn-xs dropdown-toggle" id="closedsubactions[% subscription.subscriptionid | html %]" role="button" data-toggle="dropdown" href="#">
136 Actions <b class="caret"></b>
138 <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="closedsubactions[% subscription.subscriptionid | html %]">
140 [% IF ( routing && CAN_user_serials_routing ) %]
141 [% UNLESS ( subscription.cannotedit ) %]
143 <a href="/cgi-bin/koha/serials/serials-search.pl?subscriptionid=[% subscription.subscriptionid | uri %]&op=reopen&routing=[% subscription.routing | uri %]&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-solid fa-arrow-rotate-right"></i> Reopen</a>
146 [% END # IF ( routing && CAN_user_serials_routing ) %]
149 <a href="/cgi-bin/koha/serials/serials-collection.pl?subscriptionid=[% subscription.subscriptionid | uri %]"><i class="fa-solid fa-rectangle-list"></i> Issue history</a>
154 <div class="btn-group">
155 [% IF ( CAN_user_serials_receive_serials ) %]
156 [%# There should be no space between these two buttons, it would render badly %]
157 <a class="btn btn-default btn-xs" role="button"
158 href="/cgi-bin/koha/serials/serials-edit.pl?subscriptionid=[% subscription.subscriptionid | html %]&serstatus=1,3,7"><i
159 class="fa fa-inbox"></i> Serial receive</a><a
160 class="btn btn-default btn-xs dropdown-toggle" id="subactions[% subscription.subscriptionid | html %]" role="button"
161 data-toggle="dropdown" href="#"><b class="caret"></b></a>
163 <a class="btn btn-default btn-xs dropdown-toggle" id="subactions[% subscription.subscriptionid | html %]" role="button" data-toggle="dropdown" href="#">Actions <b class="caret"></b></a>
165 <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="subactions[% subscription.subscriptionid | html %]">
167 [% IF ( routing && CAN_user_serials_routing ) %]
168 [% IF ( subscription.cannotedit ) %]
170 [% IF ( subscription.routingedit ) %]
172 <a href="/cgi-bin/koha/serials/routing.pl?subscriptionid=[% subscription.subscriptionid | uri %]"><i class="fa-solid fa-pencil" aria-hidden="true"></i> Edit routing list ([% subscription.routingedit | html %])</a>
176 <a href="/cgi-bin/koha/serials/routing.pl?subscriptionid=[% subscription.subscriptionid | uri %]&op=new"> <i class="fa fa-plus"></i> New routing list</a>
180 [% END # IF ( routing && CAN_user_serials_routing ) %]
183 <a href="/cgi-bin/koha/serials/serials-collection.pl?subscriptionid=[% subscription.subscriptionid | uri %]"><i class="fa-solid fa-rectangle-list"></i> Issue history</a>
187 [% END # IF closed %]
188 </div> <!-- /.btn-group -->
192 [% END # /UNLESS subscription.cannotdisplay %]
193 [% END # /FOREACH subscription %]
198 <td><input type="text" class="dt-filter" data-column_num="1" placeholder="Search ISSN" /></td>
199 <td><input type="text" class="dt-filter" data-column_num="2" placeholder="Search title" /></td>
200 <td><input type="text" class="dt-filter" data-column_num="3" placeholder="Search notes" /></td>
201 <td><input type="text" class="dt-filter" data-column_num="4" placeholder="Search library" /></td>
202 <td><input type="text" class="dt-filter" data-column_num="5" placeholder="Search location" /></td>
203 <td><input type="text" class="dt-filter" data-column_num="6" placeholder="Search callnumber" /></td>
204 [% SET column_num = 6 %]
206 <td><input type="text" class="dt-filter" data-column_num="7" placeholder="Search expiration date" /></td>
207 [% SET column_num = column_num + 1 %]
209 [% FOR field IN additional_fields_for_subscription %]
210 <td><input type="text" class="dt-filter" data-column_num="[% loop.count + column_num | html %]" placeholder="Search [% field.name | html %]" /></td>
217 [% END # /BLOCK subscriptions_table %]
219 <div class="main container-fluid">
221 <div class="col-sm-10 col-sm-push-2">
224 [% INCLUDE 'serials-toolbar.inc' %]
227 [% IF ( done_searched ) %]
228 <h1>Mana subscriptions ([% total | html %] found)</h1>
230 <h1>Mana subscriptions search</h1>
233 [% IF ( done_searched ) %]
234 [% IF orig_total > total %]
235 <div class="dialog alert">
236 <p>The search originally produced [% orig_total | html %] results and was limited to [% total | html %].</p>
239 <h1>Serials subscriptions ([% total | html %] found)</h1>
241 <h1>Serials subscriptions search</h1>
245 [% UNLESS ( done_searched ) %]
246 [% INCLUDE 'serials-advsearch.inc' %]
247 [% END # /UNLESS ( done_searched )%]
249 [% IF ( done_searched ) %]
252 [% WRAPPER tabs id= "serialstabs" %]
253 [% WRAPPER tabs_nav %]
255 [% WRAPPER tab_item tabname= "mana" bt_active= 1 %] <span>Mana</span> ([% total || 0 | html %]) [% END %]
257 [% WRAPPER tab_item tabname= "opened" bt_active= 1 %] <span>Open</span> ([% openedsubscriptions.size || 0 | html %]) [% END %]
258 [% WRAPPER tab_item tabname= "closed" %] <span>Closed</span> ([% closedsubscriptions.size || 0 | html %]) [% END %]
260 [% END # /WRAPPER tabs_nav %]
261 [% WRAPPER tab_panels %]
263 [% WRAPPER tab_panel tabname="mana" bt_active= 1 %]
264 [% INCLUDE 'mana/mana-subscription-search-result.inc' %]
265 [% END # /WRAPPER tab_panel#mana %]
267 [% WRAPPER tab_panel tabname="opened" bt_active= 1 %]
268 [% IF openedsubscriptions %]
269 [% INCLUDE subscriptions_table subscriptions = openedsubscriptions %]
271 <div class="dialog message">
272 <p>Your search returned no open subscriptions.</p>
275 [% END # /WRAPPER tab_panel#opened %]
276 [% WRAPPER tab_panel tabname="closed" %]
277 [% IF closedsubscriptions %]
278 [% INCLUDE subscriptions_table subscriptions = closedsubscriptions closed = 1 %]
280 <div class="dialog message">
281 <p>Your search returned no closed subscriptions.</p>
284 [% END # /WRAPPER tab_panel#closed %]
286 [% END # /WRAPPER tab_panels %]
287 [% END # /WRAPPER tabs#serialstabs %]
290 <div class="dialog message">
291 <p>Your search returned no results.</p>
293 [% END # IF ( total ) %]
294 [% END # /IF done_searched %]
297 </div> <!-- /.col-sm-10.col-sm-push-2 -->
299 <div class="col-sm-2 col-sm-pull-10">
302 [% IF ( done_searched ) %]
303 [% UNLESS ( mana ) %]
304 [% INCLUDE 'serials-advsearch.inc' brief=1 %]
305 [% END # / UNLESS ( mana ) %]
306 [% END # / IF ( done_searched ) %]
307 [% INCLUDE 'serials-menu.inc' %]
309 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
310 </div> <!-- /.row -->
312 [% MACRO jsinclude BLOCK %]
313 [% INCLUDE 'calendar.inc' %]
314 [% INCLUDE 'datatables.inc' %]
316 var subscriptionid = "[% subscriptionid | html %]";
318 [% Asset.js("js/serials-toolbar.js") | $raw %]
321 function itemSelectionBuildEditLink( tab ) {
322 var subscription_ids = new Array();
323 $( "input:checkbox." + tab + ":checked" ).each(function() {
324 subscription_ids.push( $(this).val() );
327 if (subscription_ids.length > 0) {
328 var url = "[% edit_action_link | html %]";
329 url += '&subscriptionid=' + subscription_ids.join('&subscriptionid=');
336 function enableCheckboxActions( tab ){
337 // Enable/disable controls if checkboxes are checked
338 var checked_count = $("input:checkbox." + tab + ":checked").length;
339 if( checked_count > 0 ){
340 $(".itemselection_actions." + tab ).show();
342 $(".itemselection_actions." + tab ).hide();
346 $(document).ready(function() {
347 var osrlt = $("#opened_panel table").dataTable($.extend(true, {}, dataTablesDefaults, {
348 "sPaginationType": "full",
349 "order": [[ 2, "asc" ]],
351 { 'bSortable': false, "bSearchable": false, 'aTargets': [ 'NoSort' ] },
352 { 'sType': "anti-the", 'aTargets' : [ 'anti-the'] }
356 var csrlt = $("#closed_panel table").dataTable($.extend(true, {}, dataTablesDefaults, {
357 // FIXME sort function of additional_fields!
358 "order": [[ 2, "asc" ]],
359 "sPaginationType": "full",
361 { 'bSortable': false, 'aTargets': [ 'NoSort' ] },
362 { 'sType': "anti-the", 'aTargets' : [ 'anti-the'] }
366 var manarlt = $("#mana_results_datatable").dataTable($.extend(true, {}, dataTablesDefaults, {
367 "sPaginationType": "full",
369 { 'bSortable': false, "bSearchable": false, 'aTargets': [ 'NoSort' ] },
370 { 'sType': "anti-the", 'aTargets' : [ 'anti-the'] }
374 osrlt.fnAddFilters("dt-filter", 750);
375 csrlt.fnAddFilters("dt-filter", 750);
376 manarlt.fnAddFilters("dt-filter", 750);
378 $("#reopensub").click(function(){
379 return confirm(_("Are you sure you want to reopen this subscription?"));
382 $('.select-all, .clear-all').on('click', function(e) {
384 var tab = $(this).data("tab");
385 var checkboxes = $("input:checkbox." + tab );
386 checkboxes.prop('checked', $(this).hasClass('select-all')).change();
387 enableCheckboxActions(tab);
390 enableCheckboxActions("opened");
391 enableCheckboxActions("closed");
393 $("input[name='subscriptionid'][type='checkbox']").change(function() {
394 var tab = $(this).attr("class");
395 enableCheckboxActions( tab );
398 $(".itemselection_action_modify").on("click", function(e){
400 var tab = $(this).data("tab");
401 itemSelectionBuildEditLink( tab );
406 [% FOR field IN additional_fields_for_subscription %]
407 $("label[for=additional_field_[% field.id | $raw %]], input#additional_field_[% field.id | $raw %]").hide();
414 [% INCLUDE 'intranet-bottom.inc' %]