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-remove"></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="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 fa-pencil"></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 fa-refresh"></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 [% IF ( serial.status1 ) %]<span>Expected</span>[% END %]
291 [% IF ( serial.status2 ) %]<span>Arrived</span>[% END %]
292 [% IF ( serial.status3 ) %]<span>Late</span>[% END %]
293 [% IF ( serial.status4 ) %]<span>Missing</span>[% END %]
294 [% IF ( serial.status41 ) %]<span>Missing (never received)</span>[% END %]
295 [% IF ( serial.status42 ) %]<span>Missing (sold out)</span>[% END %]
296 [% IF ( serial.status43 ) %]<span>Missing (damaged)</span>[% END %]
297 [% IF ( serial.status44 ) %]<span>Missing (lost)</span>[% END %]
298 [% IF ( serial.status5 ) %]<span>Not issued</span>[% END %]
299 [% IF ( serial.status6 ) %]<span>Delete</span>[% END %]
300 [% IF ( serial.status7 ) %]<span>Claimed</span>[% END %]
301 [% IF ( serial.status8 ) %]<span>Stopped</span>[% END %]
304 [% serial.notes | html %]
307 [% Branches.GetName( serial.branchcode ) | html %]
311 <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>
317 </table> <!-- /.subscription-year-table -->
318 [% END # /WRAPPER tab_panel#subscription-year %]
319 [% END # /FOREACH year %]
320 [% END # /WRAPPER tab_panels %]
321 <input type="hidden" name="subscriptionid" value="[% subscriptionidlist | html %]" />
322 [% END # /WRAPPER tabs#subscription_years %]
324 [% END # /IF years %]
327 </div> <!-- /.col-sm-10.col-sm-push-2 -->
329 <div class="col-sm-2 col-sm-pull-10">
331 [% INCLUDE 'serials-menu.inc' %]
333 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
334 </div> <!-- /.row -->
336 [% MACRO jsinclude BLOCK %]
337 [% INCLUDE 'datatables.inc' %]
339 var subscriptionid = "[% subscriptionid | html %]";
341 [% Asset.js("js/serials-toolbar.js") | $raw %]
345 function deleteIssues(subscriptionid) {
346 var serialschecked = $("form[name='edition'] input[name='serialid']:checked");
347 if (serialschecked.length > 0) {
348 var location = 'serials-collection.pl?subscriptionid='+subscriptionid+'&op=delete_confirm';
349 for (i=0; i < serialschecked.length; i++) {
350 location += '&serialid=' + serialschecked[i].value;
352 document.location = location;
354 alert(_("No serials selected"));
358 function generateNext(subscriptionid) {
359 if(confirm(_("Do you really want to generate next serial?"))){
360 document.location = 'serials-collection.pl?op=gennext&subscriptionid='+subscriptionid;
364 $(document).ready(function() {
365 if( $("#subscription_years .tab-pane.active").length < 1 ){
366 $("#subscription_years a:first").tab("show");
368 $(".subscription-year-table").dataTable($.extend(true, {}, dataTablesDefaults, {
370 { "aTargets": [ 0,-1 ], "bSortable": false, "bSearchable": false }
372 "aaSorting": [[0, 'desc']],
380 $(".CheckAll").on("click", function(e){
382 var years = $(this).data("year");
383 $("#subscription-year-" + years + " input:checkbox").prop("checked", true );
386 $(".CheckNone").on("click", function(e){
388 var years = $(this).data("year");
389 $("#subscription-year-" + years + " input:checkbox").prop("checked", false );
392 $(".generatenext").on("click", function(e){
394 var subscriptionid = $(this).data("subscriptionid");
395 generateNext( subscriptionid );
398 $(".subscription_renew").on("click", function(e){
400 var subscriptionid = $(this).data("subscriptionid");
401 popup( subscriptionid );
404 $(".print_list").on("click", function(e){
406 var url = $(this).attr("href");
407 window.open( url,'PrintSlip','width=500,height=500,toolbar=no,scrollbars=yes');
410 $('#multi_receiving').on('show', function () {
411 $(this).find(".modal-body").html($(".serials_multi_receiving")[0].outerHTML);
414 $("form[name='edition']").on('submit', function(e){
415 if ( $(this).find("input[name='serialid']:checked").size() == 0 ) {
417 alert(_("You must select at least one serial to edit"));
423 $(".delete-issues").on("click", function(e){
425 deleteIssues("[% subscriptionidlist | html %]");
432 [% INCLUDE 'intranet-bottom.inc' %]