3 [% USE AuthorisedValues %]
8 [% INCLUDE 'doc-head-open.inc' %]
9 <title>Serial collection information for [% bibliotitle | html %] › Serials › Koha</title>
10 [% INCLUDE 'doc-head-close.inc' %]
13 <body id="ser_serials-collection" class="ser">
14 [% WRAPPER 'header.inc' %]
15 [% INCLUDE 'serials-search.inc' %]
18 [% WRAPPER 'sub-header.inc' %]
19 [% WRAPPER breadcrumbs %]
20 [% WRAPPER breadcrumb_item %]
21 <a href="/cgi-bin/koha/serials/serials-home.pl">Serials</a>
23 [% WRAPPER breadcrumb_item %]
24 <a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% subscriptionid | uri %]"><em>[% bibliotitle | html %]</em></a>
26 [% WRAPPER breadcrumb_item bc_active= 1 %]
27 <span>Serial collection information</span>
29 [% END #/ WRAPPER breadcrumbs %]
30 [% END #/ WRAPPER sub-header.inc %]
32 <div class="main container-fluid">
34 <div class="col-sm-10 col-sm-push-2">
36 [% INCLUDE 'messages.inc' %]
38 [% INCLUDE 'modals/serials_multi_receiving.inc' %]
40 [% INCLUDE 'modals/serials_skip_issues.inc' %]
42 [% UNLESS ( popup ) %]
43 [% INCLUDE 'serials-toolbar.inc' %]
46 Serial collection information for <em>[% bibliotitle | html %]</em>
47 [% IF location %] ([% AuthorisedValues.GetByCode( 'LOC', location ) | html %]) [% END %]
48 [% IF ( callnumber ) %]callnumber: [% callnumber | html %][% END %]
53 <div class="dialog alert">
54 <h3>You are about to delete [% serialnumber | html %] serial(s). Do you want to continue?</h3>
55 <form method="post" action="/cgi-bin/koha/serials/serials-collection.pl">
56 [% INCLUDE 'csrf-token.inc' %]
57 [% IF countitems > 0 %]
58 <h5>Number of items available: [% countitems | html %]</h5>
60 <label>Delete associated items? <input type="checkbox" name="delitems" value="Yes" />Yes</label>
63 <input type="hidden" name="op" value="cud-delete_confirmed" />
64 <input type="hidden" name="biblionumber" value="[% biblionumber | html %]" />
65 <input type="hidden" name="subscriptionid" value="[% subscriptionid | html %]" />
66 [% FOREACH serialid IN serialsid %]
67 <input type="hidden" name="serialid" value="[% serialid | html %]" />
69 <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> Yes, delete</button>
71 <form method="get" action="/cgi-bin/koha/serials/serials-collection.pl">
72 <input type="hidden" name="subscriptionid" value="[% subscriptionid | html %]" />
73 <button type="submit" class="deny"><i class="fa fa-fw fa-times"></i> No, do not delete</button>
76 [% END # /IF delete %]
78 [% IF ( error_delitem ) %]
79 <div class="dialog alert">
80 <p><strong>Error</strong>: one or more associated items could not be deleted at this time.</p>
84 [% IF ( subscriptions ) %]
86 [% IF ( subscriptions.size == 1 ) %]
87 <caption> Subscription summary</caption>
89 <caption> Subscription summaries</caption>
92 <th>Subscription num.</th>
94 <th>Numbering pattern</th>
100 [% FOREACH subscription IN subscriptions %]
102 <td><a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% subscription.subscriptionid | uri %]"># [% subscription.subscriptionid | html %]</a> </td>
103 <td>[% subscription.frequency.description | html %]</td>
104 <td>[% subscription.numberpattern.label | html %]</td>
105 <td>[% IF subscription.branchcode %][% Branches.GetName( subscription.branchcode ) | html %][% END %]</td>
106 <td> [% subscription.callnumber | html %]</td>
107 <td> [% subscription.notes | html | html_line_break %]
108 [% UNLESS subscription.closed %]
109 [% IF ( subscription.subscriptionexpired ) %]
110 <p class="problem"><i class="fa fa-exclamation-circle problem" aria-hidden="true"></i> Subscription expired</p>
113 <br /> Subscription closed
116 [% IF ( subscription.abouttoexpire ) || ( subscription.subscriptionexpired ) %]
117 <td class="problem actions">
121 [% UNLESS subscription.closed %]
122 [% IF ( routing && CAN_user_serials_routing ) %]
123 [% IF ( subscription.hasRouting ) %]
124 <a class="btn btn-default btn-xs" href="/cgi-bin/koha/serials/routing.pl?subscriptionid=[% subscription.subscriptionid | html %]"><i class="fa-solid fa-pencil" aria-hidden="true"></i> Edit routing list</a>
126 <a class="btn btn-default btn-xs" href="/cgi-bin/koha/serials/routing.pl?subscriptionid=[% subscription.subscriptionid | html %]&op=new"><i class="fa fa-plus"></i> Create routing list</a>
129 [% IF ( subscription.abouttoexpire || subscription.subscriptionexpired) %]
130 <a class="btn btn-default btn-xs subscription_renew" data-subscriptionid="[% subscription.subscriptionid | html %]" href="/cgi-bin/koha/serials/subscription-renew.pl?op=renew&subscriptionid=[% subscription.subscriptionid | html %]"><i class="fa-solid fa-rotate"></i> Renew</a>
134 [% END # /UNLESS subscription.closed %]
137 [% END # /FOREACH subscription %]
139 [% IF ( subscriptioncount > 1 ) %]
141 <td colspan="8"> <a href="serials-collection.pl?biblionumber=[% biblionumber | uri %]">See any subscription attached to this biblio</a></td>
146 [% END # /IF subscriptions %]
149 <form name="edition" action="/cgi-bin/koha/serials/serials-edit.pl" method="post">
150 [% INCLUDE 'csrf-token.inc' %]
151 [% WRAPPER tabs id= "subscription_years" %]
152 [% WRAPPER tabs_nav %]
153 [% FOREACH year IN years %]
154 [% IF ( loop.first ) %]
159 [% IF ( year.year ) %]
160 [% IF year.year == 'manage' %]
161 [% SET tabname = "subscription-year-manage" %]
162 [% SET tab_text = "Manage" %]
164 [% SET tabname = "subscription-year-${year.year}" %]
165 [% SET tab_text = year.year %]
167 [% WRAPPER tab_item tabname= tabname bt_active= bt_active %] [% tab_text | html %] [% END %]
170 [% END # /WRAPPER tabs_nav %]
172 [% WRAPPER tab_panels %]
173 [% FOREACH year IN years %]
174 [% IF ( loop.first ) %]
175 [% SET bt_active = 1 %]
177 [% SET bt_active = 0 %]
179 [% WRAPPER tab_panel tabname="subscription-year-${year.year}" bt_active= bt_active %]
180 [% IF ( CAN_user_serials_receive_serials ) %]
182 <div class="btn-group"><input type="submit" value="Edit serials" class="btn btn-primary btn-sm" /></div>
183 [% UNLESS subscription.closed %]
184 <div class="btn-group">
185 <input type="button" value="Generate next" data-subscriptionid="[% subscriptionidlist | html %]" class="btn btn-default btn-sm generatenext" />
187 <div class="btn-group">
188 <input type="button" value="Skip issues and generate next" data-subscriptionid="[% subscriptionidlist | html %]" href="#skip_issues" class="btn btn-default btn-sm" data-toggle="modal" />
190 [% IF ( subscriptions.size == 1 and !serialsadditems ) %]
191 <div class="btn-group"><input type="button" value="Multi receiving" href="#multi_receiving" class="btn btn-default btn-sm" data-toggle="modal"></div>
194 <input type="button" value="Delete selected issues" class="delete-issues btn btn-default btn-sm" data-subscriptionids="[% subscriptionidlist | html %]" />
196 [% END # /IF CAN_user_serials_receive_serials %]
198 <span class="checkall">
199 <a class="CheckAll" href="#" data-year="[% year.year | html %]">Select all</a>
201 <span class="clearall">
202 <a class="CheckNone" href="#" data-year="[% year.year | html %]">Clear all</a>
205 <table class="subscription-year-table">
208 [% IF ( CAN_user_serials_receive_serials ) %]
211 [% IF ( subscriptions.size > 1 ) %]
214 <th>Date published</th>
215 <th>Date published (text)</th>
216 <th>Date received</th>
227 [% FOREACH serial IN year.serials %]
229 [% IF ( CAN_user_serials_receive_serials ) %]
231 [% UNLESS CAN_user_serials_receive_serials %]
234 [% IF ( serial.subscriptionexpired ) %]
235 <input type="checkbox" name="serialid" value="[% serial.serialid | html %]" disabled="disabled" />
238 [% IF serialsid.grep("${serial.serialid}").size %]
239 <input type="checkbox" name="serialid" value="[% serial.serialid | html %]" disabled checked />
241 <input type="checkbox" name="serialid" value="[% serial.serialid | html %]" disabled />
244 [% IF serial.checked %]
245 <input type="checkbox" name="serialid" value="[% serial.serialid | html %]" checked />
247 <input type="checkbox" name="serialid" value="[% serial.serialid | html %]" />
249 [% END # /IF delete %]
250 [% END # /IF serial.subscriptionexpired %]
251 [% END # /UNLESS CAN_user_serials_receive_serials %]
253 [% END # /IF CAN_user_serials_receive_serials %]
254 [% IF ( subscriptions.size > 1 ) %]
255 <td><a href="serials-collection.pl?subscriptionid=[% serial.subscriptionid | uri %]">[% serial.subscriptionid | html %]</a></td>
257 <td data-order="[% serial.publisheddate | html %]">
258 [% IF serial.publisheddate %]
259 [% serial.publisheddate | $KohaDates %]
264 <td data-order="[% serial.publisheddatetext | html %]">
265 [% IF serial.publisheddatetext %]
266 [% serial.publisheddatetext | html %]
269 <td data-order="[% serial.planneddate | html %]">
270 [% IF serial.planneddate %]
271 [% serial.planneddate | $KohaDates %]
277 [% IF ( matches = serial.serialseq.match('(.*)Spring(.*)') ) %]
278 [% matches.0 | html %]Spring[% matches.1 | html %]
279 [% ELSIF ( matches = serial.serialseq.match('(.*)Summer(.*)') ) %]
280 [% matches.0 | html %]Summer[% matches.1 | html %]
281 [% ELSIF ( matches = serial.serialseq.match('(.*)Fall(.*)') ) %]
282 [% matches.0 | html %]Fall[% matches.1 | html %]
283 [% ELSIF ( matches = serial.serialseq.match('(.*)Winter(.*)') ) %]
284 [% matches.0 | html %]Winter[% matches.1 | html %]
285 [% ELSIF ( matches = prediction.number.match('(.*)Spr(.*)') ) %]
286 [% matches.0 | html %]Spr[% matches.1 | html %]
287 [% ELSIF ( matches = prediction.number.match('(.*)Sum(.*)') ) %]
288 [% matches.0 | html %]Sum[% matches.1 | html %]
289 [% ELSIF ( matches = prediction.number.match('(.*)Fal(.*)') ) %]
290 [% matches.0 | html %]Fal[% matches.1 | html %]
291 [% ELSIF ( matches = prediction.number.match('(.*)Win(.*)') ) %]
292 [% matches.0 | html %]Win[% matches.1 | html %]
294 [% serial.serialseq | html %]
298 [% INCLUDE 'serial-status.inc' serial = serial %]
301 [% serial.notes | html %]
304 [% Branches.GetName( serial.branchcode ) | html %]
308 <a href="/cgi-bin/koha/serials/routing-preview.pl?ok=1&subscriptionid=[% serial.subscriptionid | uri %]&issue=[% serial.serialseq.replace("'", "\\'") | uri %]%20([% serial.publisheddate | $KohaDates %])" class="btn btn-default btn-xs print_list"><i class="fa fa-print"></i> Print list</a>
314 </table> <!-- /.subscription-year-table -->
315 [% END # /WRAPPER tab_panel#subscription-year %]
316 [% END # /FOREACH year %]
317 [% END # /WRAPPER tab_panels %]
318 <input type="hidden" name="subscriptionid" value="[% subscriptionidlist | html %]" />
319 [% END # /WRAPPER tabs#subscription_years %]
321 [% END # /IF years %]
324 </div> <!-- /.col-sm-10.col-sm-push-2 -->
326 <div class="col-sm-2 col-sm-pull-10">
328 [% INCLUDE 'serials-menu.inc' %]
330 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
331 </div> <!-- /.row -->
333 [% MACRO jsinclude BLOCK %]
334 [% INCLUDE 'datatables.inc' %]
336 var subscriptionid = "[% subscriptionid | html %]";
338 [% Asset.js("js/serials-toolbar.js") | $raw %]
342 function deleteIssues(subscriptionid) {
343 var serialschecked = $("form[name='edition'] input[name='serialid']:checked");
344 if (serialschecked.length > 0) {
345 var location = 'serials-collection.pl?subscriptionid='+subscriptionid+'&op=delete_confirm';
346 for (i=0; i < serialschecked.length; i++) {
347 location += '&serialid=' + serialschecked[i].value;
349 document.location = location;
351 alert(_("No serials selected"));
355 function generateNext(subscriptionid) {
356 if(confirm(_("Do you really want to generate next serial?"))){
357 document.location = 'serials-collection.pl?op=gennext&subscriptionid='+subscriptionid;
361 $(document).ready(function() {
362 if( $("#subscription_years .tab-pane.active").length < 1 ){
363 $("#subscription_years a:first").tab("show");
365 $(".subscription-year-table").dataTable($.extend(true, {}, dataTablesDefaults, {
367 { "targets": [ 0,-1 ], "orderable": false, "searchable": false }
369 "order": [[0, 'desc']],
377 $(".CheckAll").on("click", function(e){
379 var years = $(this).data("year");
380 $("#subscription-year-" + years + "_panel" + " input:checkbox").prop("checked", true );
383 $(".CheckNone").on("click", function(e){
385 var years = $(this).data("year");
386 $("#subscription-year-" + years + "_panel" + " input:checkbox").prop("checked", false );
389 $(".generatenext").on("click", function(e){
391 var subscriptionid = $(this).data("subscriptionid");
392 generateNext( subscriptionid );
395 $(".subscription_renew").on("click", function(e){
397 var subscriptionid = $(this).data("subscriptionid");
398 popup( subscriptionid );
401 $(".print_list").on("click", function(e){
403 var url = $(this).attr("href");
404 window.open( url,'PrintSlip','width=500,height=500,toolbar=no,scrollbars=yes');
407 $('#multi_receiving').on('show', function () {
408 $(this).find(".modal-body").html($(".serials_multi_receiving")[0].outerHTML);
411 $("form[name='edition']").on('submit', function(e){
412 if ( $(this).find("input[name='serialid']:checked").size() == 0 ) {
414 alert(_("You must select at least one serial to edit"));
420 $(".delete-issues").on("click", function(e){
422 deleteIssues("[% subscriptionidlist | html %]");
429 [% INCLUDE 'intranet-bottom.inc' %]