3 [% USE AuthorisedValues %]
7 [% INCLUDE 'doc-head-open.inc' %]
8 <title>Serial collection information for [% bibliotitle | html %] › Serials › Koha</title>
9 [% INCLUDE 'doc-head-close.inc' %]
12 <body id="ser_serials-collection" class="ser">
13 [% WRAPPER 'header.inc' %]
14 [% INCLUDE 'serials-search.inc' %]
17 [% WRAPPER 'sub-header.inc' %]
18 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
21 <a href="/cgi-bin/koha/mainpage.pl"><i class="fa fa-home"></i></a>
24 <a href="/cgi-bin/koha/serials/serials-home.pl">Serials</a>
27 <a href="#" aria-current="page">
28 Serial collection information for <em>[% bibliotitle | html %]</em>
35 <div class="main container-fluid">
37 <div class="col-sm-10 col-sm-push-2">
40 [% INCLUDE 'modals/serials_multi_receiving.inc' %]
42 [% UNLESS ( popup ) %]
43 [% INCLUDE 'serials-toolbar.inc' %]
45 <h1>Serial collection information for <em>[% bibliotitle | html %]</em>
46 [% IF location %] ([% AuthorisedValues.GetByCode( 'LOC', location ) | html %]) [% END %]
47 [% IF ( callnumber ) %]callnumber: [% callnumber | html %][% END %]</h1>
51 <div class="dialog alert">
52 <h3>You are about to delete [% serialnumber | html %] serial(s). Do you want to continue?</h3>
53 <form action="/cgi-bin/koha/serials/serials-collection.pl/#">
54 [% IF countitems > 0 %]
55 <h5>Number of items available: [% countitems | html %]</h5>
57 <label>Delete associated items? <input type="checkbox" name="delitems" value="Yes" />Yes</label>
60 <input type="hidden" name="op" value="delete_confirmed" />
61 <input type="hidden" name="biblionumber" value="[% biblionumber | html %]" />
62 <input type="hidden" name="subscriptionid" value="[% subscriptionid | html %]" />
63 [% FOREACH serialid IN serialsid %]
64 <input type="hidden" name="serialid" value="[% serialid | html %]" />
66 <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> Yes, delete</button>
68 <form action="/cgi-bin/koha/serials/serials-collection.pl">
69 <input type="hidden" name="subscriptionid" value="[% subscriptionid | html %]" />
70 <button type="submit" class="deny"><i class="fa fa-fw fa-remove"></i> No, do not delete</button>
75 [% IF ( error_delitem ) %]
76 <div class="dialog alert">
77 <p><strong>Error</strong>: one or more associated items could not be deleted at this time.</p>
81 [% IF ( subscriptions ) %]
83 [% IF ( subscriptions.size == 1 ) %]
84 <caption> Subscription summary</caption>
86 <caption> Subscription summaries</caption>
89 <th>Subscription num.</th>
91 <th>Numbering pattern</th>
97 [% FOREACH subscription IN subscriptions %]
99 <td><a href="subscription-detail.pl?subscriptionid=[% subscription.subscriptionid | uri %]"># [% subscription.subscriptionid | html %]</a> </td>
100 <td>[% subscription.frequency.description | html %]</td>
101 <td>[% subscription.numberpattern.label | html %]</td>
102 <td>[% IF subscription.branchcode %][% Branches.GetName( subscription.branchcode ) | html %][% END %]</td>
103 <td> [% subscription.callnumber | html %]</td>
104 <td> [% subscription.notes | html | html_line_break %]
105 [% UNLESS subscription.closed %]
106 [% IF ( subscription.subscriptionexpired ) %]
107 <p class="problem"><i class="fa fa-exclamation-circle problem" aria-hidden="true"></i> Subscription expired</p>
110 <br /> Subscription closed
113 [% IF ( subscription.abouttoexpire ) || ( subscription.subscriptionexpired ) %]<td class="problem actions">[% ELSE %]<td class="actions">[% END %]
114 [% UNLESS subscription.closed %]
115 [% IF ( routing && CAN_user_serials_routing ) %]
116 [% IF ( subscription.hasRouting ) %]
117 <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>
119 <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>
122 [% IF ( subscription.abouttoexpire || subscription.subscriptionexpired) %]
123 <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>
132 [% IF ( subscriptioncount > 1 ) %]
133 <tr ><td colspan="8"> <a href="serials-collection.pl?biblionumber=[% biblionumber | uri %]">See any subscription attached to this biblio</a></td>
141 [% IF ( years ) %]<form name="edition" action="/cgi-bin/koha/serials/serials-edit.pl" method="post">
142 <div id="subscription_years" class="toptabs numbered">
143 <ul class="nav nav-tabs" role="tablist">
144 [% FOREACH year IN years %]
145 [% IF ( year.year ) %]
146 [% IF year.year == 'manage' %]
147 <li role="presentation"><a href="#subscription-year-manage" aria-controls="subscription-year-manage" role="tab" data-toggle="tab">Manage</a></li>
149 <li role="presentation"><a href="#subscription-year-[% year.year | uri %]" aria-controls="subscription-year-[% year.year | uri %]" role="tab" data-toggle="tab">[% year.year | html %]</a></li>
154 <div class="tab-content">
155 [% FOREACH year IN years %]
156 <div id="subscription-year-[% year.year | html %]" role="tabpanel" class="tab-pane">
157 [% IF ( CAN_user_serials_receive_serials ) %]
159 <div class="btn-group"><input type="submit" value="Edit serials" class="btn btn-default btn-sm" /></div>
160 [% UNLESS subscription.closed %]
161 <div class="btn-group">
162 <input type="button" value="Generate next" data-subscriptionid="[% subscriptionidlist | html %]" class="btn btn-default btn-sm generatenext" />
164 [% IF ( subscriptions.size == 1 and !serialsadditems ) %]
165 <div class="btn-group"><input type="button" value="Multi receiving" href="#multi_receiving" class="btn btn-default btn-sm" data-toggle="modal"></div>
168 <input type="button" value="Delete selected issues" class="delete-issues btn btn-default btn-sm" data-subscriptionids="[% subscriptionidlist | html %]" />
171 <span class="checkall">
172 <a class="CheckAll" href="#" data-year="[% year.year | html %]">Select all</a>
174 <span class="clearall">
175 <a class="CheckNone" href="#" data-year="[% year.year | html %]">Clear all</a>
177 <table class="subscription-year-table">
180 [% IF ( CAN_user_serials_receive_serials ) %]<th>Edit</th>[% END %]
181 [% IF ( subscriptions.size > 1 ) %]
186 <th>Date published (text)
198 [% IF ( routing ) %]<th>Routing</th>[% END %]
202 [% FOREACH serial IN year.serials %]
204 [% IF ( CAN_user_serials_receive_serials ) %]
206 [% UNLESS CAN_user_serials_receive_serials %]
209 [% IF ( serial.subscriptionexpired ) %]
210 <input type="checkbox" name="serialid" value="[% serial.serialid | html %]" disabled="disabled" />
213 [% IF serialsid.grep("${serial.serialid}").size %]
214 <input type="checkbox" name="serialid" value="[% serial.serialid | html %]" disabled checked />
216 <input type="checkbox" name="serialid" value="[% serial.serialid | html %]" disabled />
219 [% IF serial.checked %]
220 <input type="checkbox" name="serialid" value="[% serial.serialid | html %]" checked />
222 <input type="checkbox" name="serialid" value="[% serial.serialid | html %]" />
229 [% IF ( subscriptions.size > 1 ) %]
230 <td><a href="serials-collection.pl?subscriptionid=[% serial.subscriptionid | uri %]">[% serial.subscriptionid | html %]</a></td>
232 <td data-order="[% serial.publisheddate | html %]">
233 [% IF serial.publisheddate %]
234 [% serial.publisheddate | $KohaDates %]
239 <td data-order="[% serial.publisheddatetext | html %]">
240 [% IF serial.publisheddatetext %]
241 [% serial.publisheddatetext | html %]
244 <td data-order="[% serial.planneddate | html %]">
245 [% IF serial.planneddate %]
246 [% serial.planneddate | $KohaDates %]
252 [% IF ( matches = serial.serialseq.match('(.*)Spring(.*)') ) %]
253 [% matches.0 | html %]Spring[% matches.1 | html %]
254 [% ELSIF ( matches = serial.serialseq.match('(.*)Summer(.*)') ) %]
255 [% matches.0 | html %]Summer[% matches.1 | html %]
256 [% ELSIF ( matches = serial.serialseq.match('(.*)Fall(.*)') ) %]
257 [% matches.0 | html %]Fall[% matches.1 | html %]
258 [% ELSIF ( matches = serial.serialseq.match('(.*)Winter(.*)') ) %]
259 [% matches.0 | html %]Winter[% matches.1 | html %]
260 [% ELSIF ( matches = prediction.number.match('(.*)Spr(.*)') ) %]
261 [% matches.0 | html %]Spr[% matches.1 | html %]
262 [% ELSIF ( matches = prediction.number.match('(.*)Sum(.*)') ) %]
263 [% matches.0 | html %]Sum[% matches.1 | html %]
264 [% ELSIF ( matches = prediction.number.match('(.*)Fal(.*)') ) %]
265 [% matches.0 | html %]Fal[% matches.1 | html %]
266 [% ELSIF ( matches = prediction.number.match('(.*)Win(.*)') ) %]
267 [% matches.0 | html %]Win[% matches.1 | html %]
269 [% serial.serialseq | html %]
273 [% IF ( serial.status1 ) %]<span>Expected</span>[% END %]
274 [% IF ( serial.status2 ) %]<span>Arrived</span>[% END %]
275 [% IF ( serial.status3 ) %]<span>Late</span>[% END %]
276 [% IF ( serial.status4 ) %]<span>Missing</span>[% END %]
277 [% IF ( serial.status41 ) %]<span>Missing (never received)</span>[% END %]
278 [% IF ( serial.status42 ) %]<span>Missing (sold out)</span>[% END %]
279 [% IF ( serial.status43 ) %]<span>Missing (damaged)</span>[% END %]
280 [% IF ( serial.status44 ) %]<span>Missing (lost)</span>[% END %]
281 [% IF ( serial.status5 ) %]<span>Not issued</span>[% END %]
282 [% IF ( serial.status6 ) %]<span>Delete</span>[% END %]
283 [% IF ( serial.status7 ) %]<span>Claimed</span>[% END %]
284 [% IF ( serial.status8 ) %]<span>Stopped</span>[% END %]
287 [% serial.notes | html %]
290 [% Branches.GetName( serial.branchcode ) | html %]
294 <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>
304 <input type="hidden" name="subscriptionid" value="[% subscriptionidlist | html %]" />
311 </div> <!-- /.col-sm-10.col-sm-push-2 -->
313 <div class="col-sm-2 col-sm-pull-10">
315 [% INCLUDE 'serials-menu.inc' %]
317 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
318 </div> <!-- /.row -->
320 [% MACRO jsinclude BLOCK %]
321 [% INCLUDE 'datatables.inc' %]
323 var subscriptionid = "[% subscriptionid | html %]";
325 [% Asset.js("js/serials-toolbar.js") | $raw %]
329 function deleteIssues(subscriptionid) {
330 var serialschecked = $("form[name='edition'] input[name='serialid']:checked");
331 if (serialschecked.length > 0) {
332 var location = 'serials-collection.pl?subscriptionid='+subscriptionid+'&op=delete_confirm';
333 for (i=0; i < serialschecked.length; i++) {
334 location += '&serialid=' + serialschecked[i].value;
336 document.location = location;
338 alert(_("No serials selected"));
342 function generateNext(subscriptionid) {
343 if(confirm(_("Do you really want to generate next serial?"))){
344 document.location = 'serials-collection.pl?op=gennext&subscriptionid='+subscriptionid;
348 $(document).ready(function() {
349 if( $("#subscription_years .tab-pane.active").length < 1 ){
350 $("#subscription_years a:first").tab("show");
352 $(".subscription-year-table").dataTable($.extend(true, {}, dataTablesDefaults, {
354 { "aTargets": [ 0,-1 ], "bSortable": false, "bSearchable": false }
356 "aaSorting": [[0, 'desc']],
364 $(".CheckAll").on("click", function(e){
366 var years = $(this).data("year");
367 $("#subscription-year-" + years + " input:checkbox").prop("checked", true );
370 $(".CheckNone").on("click", function(e){
372 var years = $(this).data("year");
373 $("#subscription-year-" + years + " input:checkbox").prop("checked", false );
376 $(".generatenext").on("click", function(e){
378 var subscriptionid = $(this).data("subscriptionid");
379 generateNext( subscriptionid );
382 $(".subscription_renew").on("click", function(e){
384 var subscriptionid = $(this).data("subscriptionid");
385 popup( subscriptionid );
388 $(".print_list").on("click", function(e){
390 var url = $(this).attr("href");
391 window.open( url,'PrintSlip','width=500,height=500,toolbar=no,scrollbars=yes');
394 $('#multi_receiving').on('show', function () {
395 $(this).find(".modal-body").html($(".serials_multi_receiving")[0].outerHTML);
398 $("form[name='edition']").on('submit', function(e){
399 if ( $(this).find("input[name='serialid']:checked").size() == 0 ) {
401 alert(_("You must select at least one serial to edit"));
407 $(".delete-issues").on("click", function(e){
409 deleteIssues("[% subscriptionidlist | html %]");
416 [% INCLUDE 'intranet-bottom.inc' %]