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">
37 [% INCLUDE 'modals/serials_multi_receiving.inc' %]
39 [% UNLESS ( popup ) %]
40 [% INCLUDE 'serials-toolbar.inc' %]
43 Serial collection information for <em>[% bibliotitle | html %]</em>
44 [% IF location %] ([% AuthorisedValues.GetByCode( 'LOC', location ) | html %]) [% END %]
45 [% IF ( callnumber ) %]callnumber: [% callnumber | html %][% END %]
50 <div class="dialog alert">
51 <h3>You are about to delete [% serialnumber | html %] serial(s). Do you want to continue?</h3>
52 <form action="/cgi-bin/koha/serials/serials-collection.pl">
53 [% IF countitems > 0 %]
54 <h5>Number of items available: [% countitems | html %]</h5>
56 <label>Delete associated items? <input type="checkbox" name="delitems" value="Yes" />Yes</label>
59 <input type="hidden" name="op" value="delete_confirmed" />
60 <input type="hidden" name="biblionumber" value="[% biblionumber | html %]" />
61 <input type="hidden" name="subscriptionid" value="[% subscriptionid | html %]" />
62 [% FOREACH serialid IN serialsid %]
63 <input type="hidden" name="serialid" value="[% serialid | html %]" />
65 <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> Yes, delete</button>
67 <form action="/cgi-bin/koha/serials/serials-collection.pl">
68 <input type="hidden" name="subscriptionid" value="[% subscriptionid | html %]" />
69 <button type="submit" class="deny"><i class="fa fa-fw fa-times"></i> No, do not delete</button>
72 [% END # /IF delete %]
74 [% IF ( error_delitem ) %]
75 <div class="dialog alert">
76 <p><strong>Error</strong>: one or more associated items could not be deleted at this time.</p>
80 [% IF ( subscriptions ) %]
82 [% IF ( subscriptions.size == 1 ) %]
83 <caption> Subscription summary</caption>
85 <caption> Subscription summaries</caption>
88 <th>Subscription num.</th>
90 <th>Numbering pattern</th>
96 [% FOREACH subscription IN subscriptions %]
98 <td><a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% subscription.subscriptionid | uri %]"># [% subscription.subscriptionid | html %]</a> </td>
99 <td>[% subscription.frequency.description | html %]</td>
100 <td>[% subscription.numberpattern.label | html %]</td>
101 <td>[% IF subscription.branchcode %][% Branches.GetName( subscription.branchcode ) | html %][% END %]</td>
102 <td> [% subscription.callnumber | html %]</td>
103 <td> [% subscription.notes | html | html_line_break %]
104 [% UNLESS subscription.closed %]
105 [% IF ( subscription.subscriptionexpired ) %]
106 <p class="problem"><i class="fa fa-exclamation-circle problem" aria-hidden="true"></i> Subscription expired</p>
109 <br /> Subscription closed
112 [% IF ( subscription.abouttoexpire ) || ( subscription.subscriptionexpired ) %]
113 <td class="problem actions">
117 [% UNLESS subscription.closed %]
118 [% IF ( routing && CAN_user_serials_routing ) %]
119 [% IF ( subscription.hasRouting ) %]
120 <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>
122 <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>
125 [% IF ( subscription.abouttoexpire || subscription.subscriptionexpired) %]
126 <a class="btn btn-default btn-xs subscription_renew" data-subscriptionid="[% subscription.subscriptionid | html %]" href="/cgi-bin/koha/serials/subscription-renew.pl?subscriptionid=[% subscription.subscriptionid | html %]"><i class="fa-solid fa-rotate"></i> Renew</a>
130 [% END # /UNLESS subscription.closed %]
133 [% END # /FOREACH subscription %]
135 [% IF ( subscriptioncount > 1 ) %]
137 <td colspan="8"> <a href="serials-collection.pl?biblionumber=[% biblionumber | uri %]">See any subscription attached to this biblio</a></td>
142 [% END # /IF subscriptions %]
145 <form name="edition" action="/cgi-bin/koha/serials/serials-edit.pl" method="post">
146 [% WRAPPER tabs id= "subscription_years" %]
147 [% WRAPPER tabs_nav %]
148 [% FOREACH year IN years %]
149 [% IF ( loop.first ) %]
154 [% IF ( year.year ) %]
155 [% IF year.year == 'manage' %]
156 [% SET tabname = "subscription-year-manage" %]
157 [% SET tab_text = "Manage" %]
159 [% SET tabname = "subscription-year-${year.year}" %]
160 [% SET tab_text = year.year %]
162 [% WRAPPER tab_item tabname= tabname bt_active= bt_active %] [% tab_text | html %] [% END %]
165 [% END # /WRAPPER tabs_nav %]
167 [% WRAPPER tab_panels %]
168 [% FOREACH year IN years %]
169 [% IF ( loop.first ) %]
170 [% SET bt_active = 1 %]
172 [% SET bt_active = 0 %]
174 [% WRAPPER tab_panel tabname="subscription-year-${year.year}" bt_active= bt_active %]
175 [% IF ( CAN_user_serials_receive_serials ) %]
177 <div class="btn-group"><input type="submit" value="Edit serials" class="btn btn-primary btn-sm" /></div>
178 [% UNLESS subscription.closed %]
179 <div class="btn-group">
180 <input type="button" value="Generate next" data-subscriptionid="[% subscriptionidlist | html %]" class="btn btn-default btn-sm generatenext" />
182 [% IF ( subscriptions.size == 1 and !serialsadditems ) %]
183 <div class="btn-group"><input type="button" value="Multi receiving" href="#multi_receiving" class="btn btn-default btn-sm" data-toggle="modal"></div>
186 <input type="button" value="Delete selected issues" class="delete-issues btn btn-default btn-sm" data-subscriptionids="[% subscriptionidlist | html %]" />
188 [% END # /IF CAN_user_serials_receive_serials %]
190 <span class="checkall">
191 <a class="CheckAll" href="#" data-year="[% year.year | html %]">Select all</a>
193 <span class="clearall">
194 <a class="CheckNone" href="#" data-year="[% year.year | html %]">Clear all</a>
197 <table class="subscription-year-table">
200 [% IF ( CAN_user_serials_receive_serials ) %]
203 [% IF ( subscriptions.size > 1 ) %]
206 <th>Date published</th>
207 <th>Date published (text)</th>
208 <th>Date received</th>
219 [% FOREACH serial IN year.serials %]
221 [% IF ( CAN_user_serials_receive_serials ) %]
223 [% UNLESS CAN_user_serials_receive_serials %]
226 [% IF ( serial.subscriptionexpired ) %]
227 <input type="checkbox" name="serialid" value="[% serial.serialid | html %]" disabled="disabled" />
230 [% IF serialsid.grep("${serial.serialid}").size %]
231 <input type="checkbox" name="serialid" value="[% serial.serialid | html %]" disabled checked />
233 <input type="checkbox" name="serialid" value="[% serial.serialid | html %]" disabled />
236 [% IF serial.checked %]
237 <input type="checkbox" name="serialid" value="[% serial.serialid | html %]" checked />
239 <input type="checkbox" name="serialid" value="[% serial.serialid | html %]" />
241 [% END # /IF delete %]
242 [% END # /IF serial.subscriptionexpired %]
243 [% END # /UNLESS CAN_user_serials_receive_serials %]
245 [% END # /IF CAN_user_serials_receive_serials %]
246 [% IF ( subscriptions.size > 1 ) %]
247 <td><a href="serials-collection.pl?subscriptionid=[% serial.subscriptionid | uri %]">[% serial.subscriptionid | html %]</a></td>
249 <td data-order="[% serial.publisheddate | html %]">
250 [% IF serial.publisheddate %]
251 [% serial.publisheddate | $KohaDates %]
256 <td data-order="[% serial.publisheddatetext | html %]">
257 [% IF serial.publisheddatetext %]
258 [% serial.publisheddatetext | html %]
261 <td data-order="[% serial.planneddate | html %]">
262 [% IF serial.planneddate %]
263 [% serial.planneddate | $KohaDates %]
269 [% IF ( matches = serial.serialseq.match('(.*)Spring(.*)') ) %]
270 [% matches.0 | html %]Spring[% matches.1 | html %]
271 [% ELSIF ( matches = serial.serialseq.match('(.*)Summer(.*)') ) %]
272 [% matches.0 | html %]Summer[% matches.1 | html %]
273 [% ELSIF ( matches = serial.serialseq.match('(.*)Fall(.*)') ) %]
274 [% matches.0 | html %]Fall[% matches.1 | html %]
275 [% ELSIF ( matches = serial.serialseq.match('(.*)Winter(.*)') ) %]
276 [% matches.0 | html %]Winter[% matches.1 | html %]
277 [% ELSIF ( matches = prediction.number.match('(.*)Spr(.*)') ) %]
278 [% matches.0 | html %]Spr[% matches.1 | html %]
279 [% ELSIF ( matches = prediction.number.match('(.*)Sum(.*)') ) %]
280 [% matches.0 | html %]Sum[% matches.1 | html %]
281 [% ELSIF ( matches = prediction.number.match('(.*)Fal(.*)') ) %]
282 [% matches.0 | html %]Fal[% matches.1 | html %]
283 [% ELSIF ( matches = prediction.number.match('(.*)Win(.*)') ) %]
284 [% matches.0 | html %]Win[% matches.1 | html %]
286 [% serial.serialseq | html %]
290 [% INCLUDE 'serial-status.inc' serial = serial %]
293 [% serial.notes | html %]
296 [% Branches.GetName( serial.branchcode ) | html %]
300 <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>
306 </table> <!-- /.subscription-year-table -->
307 [% END # /WRAPPER tab_panel#subscription-year %]
308 [% END # /FOREACH year %]
309 [% END # /WRAPPER tab_panels %]
310 <input type="hidden" name="subscriptionid" value="[% subscriptionidlist | html %]" />
311 [% END # /WRAPPER tabs#subscription_years %]
313 [% END # /IF years %]
316 </div> <!-- /.col-sm-10.col-sm-push-2 -->
318 <div class="col-sm-2 col-sm-pull-10">
320 [% INCLUDE 'serials-menu.inc' %]
322 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
323 </div> <!-- /.row -->
325 [% MACRO jsinclude BLOCK %]
326 [% INCLUDE 'datatables.inc' %]
328 var subscriptionid = "[% subscriptionid | html %]";
330 [% Asset.js("js/serials-toolbar.js") | $raw %]
334 function deleteIssues(subscriptionid) {
335 var serialschecked = $("form[name='edition'] input[name='serialid']:checked");
336 if (serialschecked.length > 0) {
337 var location = 'serials-collection.pl?subscriptionid='+subscriptionid+'&op=delete_confirm';
338 for (i=0; i < serialschecked.length; i++) {
339 location += '&serialid=' + serialschecked[i].value;
341 document.location = location;
343 alert(_("No serials selected"));
347 function generateNext(subscriptionid) {
348 if(confirm(_("Do you really want to generate next serial?"))){
349 document.location = 'serials-collection.pl?op=gennext&subscriptionid='+subscriptionid;
353 $(document).ready(function() {
354 if( $("#subscription_years .tab-pane.active").length < 1 ){
355 $("#subscription_years a:first").tab("show");
357 $(".subscription-year-table").dataTable($.extend(true, {}, dataTablesDefaults, {
359 { "aTargets": [ 0,-1 ], "bSortable": false, "bSearchable": false }
361 "aaSorting": [[0, 'desc']],
369 $(".CheckAll").on("click", function(e){
371 var years = $(this).data("year");
372 $("#subscription-year-" + years + "_panel" + " input:checkbox").prop("checked", true );
375 $(".CheckNone").on("click", function(e){
377 var years = $(this).data("year");
378 $("#subscription-year-" + years + "_panel" + " input:checkbox").prop("checked", false );
381 $(".generatenext").on("click", function(e){
383 var subscriptionid = $(this).data("subscriptionid");
384 generateNext( subscriptionid );
387 $(".subscription_renew").on("click", function(e){
389 var subscriptionid = $(this).data("subscriptionid");
390 popup( subscriptionid );
393 $(".print_list").on("click", function(e){
395 var url = $(this).attr("href");
396 window.open( url,'PrintSlip','width=500,height=500,toolbar=no,scrollbars=yes');
399 $('#multi_receiving').on('show', function () {
400 $(this).find(".modal-body").html($(".serials_multi_receiving")[0].outerHTML);
403 $("form[name='edition']").on('submit', function(e){
404 if ( $(this).find("input[name='serialid']:checked").size() == 0 ) {
406 alert(_("You must select at least one serial to edit"));
412 $(".delete-issues").on("click", function(e){
414 deleteIssues("[% subscriptionidlist | html %]");
421 [% INCLUDE 'intranet-bottom.inc' %]