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">Home</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' %]
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 action="/cgi-bin/koha/serials/serials-collection.pl/#">
56 [% IF countitems > 0 %]
57 <h5>Number of items available: [% countitems | html %]</h5>
59 <label>Delete associated items? <input type="checkbox" name="delitems" value="Yes" />Yes</label>
62 <input type="hidden" name="op" value="delete_confirmed" />
63 <input type="hidden" name="biblionumber" value="[% biblionumber | html %]" />
64 <input type="hidden" name="subscriptionid" value="[% subscriptionid | html %]" />
65 [% FOREACH serialid IN serialsid %]
66 <input type="hidden" name="serialid" value="[% serialid | html %]" />
68 <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> Yes, delete</button>
70 <form action="/cgi-bin/koha/serials/serials-collection.pl">
71 <input type="hidden" name="subscriptionid" value="[% subscriptionid | html %]" />
72 <button type="submit" class="deny"><i class="fa fa-fw fa-remove"></i> No, do not delete</button>
77 [% IF ( error_delitem ) %]
78 <div class="dialog alert">
79 <p><strong>Error</strong>: one or more associated items could not be deleted at this time.</p>
83 [% IF ( subscriptions ) %]
85 [% IF ( subscriptions.size == 1 ) %]
86 <caption> Subscription summary</caption>
88 <caption> Subscription summaries</caption>
91 <th>Subscription num.</th>
93 <th>Numbering pattern</th>
99 [% FOREACH subscription IN subscriptions %]
101 <td><a href="subscription-detail.pl?subscriptionid=[% subscription.subscriptionid | uri %]"># [% subscription.subscriptionid | html %]</a> </td>
102 <td>[% subscription.frequency.description | html %]</td>
103 <td>[% subscription.numberpattern.label | html %]</td>
104 <td>[% IF subscription.branchcode %][% Branches.GetName( subscription.branchcode ) | html %][% END %]</td>
105 <td> [% subscription.callnumber | html %]</td>
106 <td> [% subscription.notes | html | html_line_break %]
107 [% UNLESS subscription.closed %]
108 [% IF ( subscription.subscriptionexpired ) %]
109 <p class="problem"><i class="fa fa-exclamation-circle problem" aria-hidden="true"></i> Subscription expired</p>
112 <br /> Subscription closed
115 [% IF ( subscription.abouttoexpire ) || ( subscription.subscriptionexpired ) %]
116 <td class="problem actions">
120 [% UNLESS subscription.closed %]
121 [% IF ( routing && CAN_user_serials_routing ) %]
122 [% IF ( subscription.hasRouting ) %]
123 <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>
125 <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>
128 [% IF ( subscription.abouttoexpire || subscription.subscriptionexpired) %]
129 <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>
138 [% IF ( subscriptioncount > 1 ) %]
140 <td colspan="8"> <a href="serials-collection.pl?biblionumber=[% biblionumber | uri %]">See any subscription attached to this biblio</a></td>
148 <form name="edition" action="/cgi-bin/koha/serials/serials-edit.pl" method="post">
149 <div id="subscription_years" class="toptabs numbered">
150 <ul class="nav nav-tabs" role="tablist">
151 [% FOREACH year IN years %]
152 [% IF ( year.year ) %]
153 [% IF year.year == 'manage' %]
154 <li role="presentation"><a href="#subscription-year-manage" aria-controls="subscription-year-manage" role="tab" data-toggle="tab">Manage</a></li>
156 <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>
162 <div class="tab-content">
163 [% FOREACH year IN years %]
164 <div id="subscription-year-[% year.year | html %]" role="tabpanel" class="tab-pane">
165 [% IF ( CAN_user_serials_receive_serials ) %]
167 <div class="btn-group"><input type="submit" value="Edit serials" class="btn btn-primary btn-sm" /></div>
168 [% UNLESS subscription.closed %]
169 <div class="btn-group">
170 <input type="button" value="Generate next" data-subscriptionid="[% subscriptionidlist | html %]" class="btn btn-default btn-sm generatenext" />
172 [% IF ( subscriptions.size == 1 and !serialsadditems ) %]
173 <div class="btn-group"><input type="button" value="Multi receiving" href="#multi_receiving" class="btn btn-default btn-sm" data-toggle="modal"></div>
176 <input type="button" value="Delete selected issues" class="delete-issues btn btn-default btn-sm" data-subscriptionids="[% subscriptionidlist | html %]" />
180 <span class="checkall">
181 <a class="CheckAll" href="#" data-year="[% year.year | html %]">Select all</a>
183 <span class="clearall">
184 <a class="CheckNone" href="#" data-year="[% year.year | html %]">Clear all</a>
187 <table class="subscription-year-table">
190 [% IF ( CAN_user_serials_receive_serials ) %]
193 [% IF ( subscriptions.size > 1 ) %]
196 <th>Date published</th>
197 <th>Date published (text)</th>
198 <th>Date received</th>
209 [% FOREACH serial IN year.serials %]
211 [% IF ( CAN_user_serials_receive_serials ) %]
213 [% UNLESS CAN_user_serials_receive_serials %]
216 [% IF ( serial.subscriptionexpired ) %]
217 <input type="checkbox" name="serialid" value="[% serial.serialid | html %]" disabled="disabled" />
220 [% IF serialsid.grep("${serial.serialid}").size %]
221 <input type="checkbox" name="serialid" value="[% serial.serialid | html %]" disabled checked />
223 <input type="checkbox" name="serialid" value="[% serial.serialid | html %]" disabled />
226 [% IF serial.checked %]
227 <input type="checkbox" name="serialid" value="[% serial.serialid | html %]" checked />
229 <input type="checkbox" name="serialid" value="[% serial.serialid | html %]" />
236 [% IF ( subscriptions.size > 1 ) %]
237 <td><a href="serials-collection.pl?subscriptionid=[% serial.subscriptionid | uri %]">[% serial.subscriptionid | html %]</a></td>
239 <td data-order="[% serial.publisheddate | html %]">
240 [% IF serial.publisheddate %]
241 [% serial.publisheddate | $KohaDates %]
246 <td data-order="[% serial.publisheddatetext | html %]">
247 [% IF serial.publisheddatetext %]
248 [% serial.publisheddatetext | html %]
251 <td data-order="[% serial.planneddate | html %]">
252 [% IF serial.planneddate %]
253 [% serial.planneddate | $KohaDates %]
259 [% IF ( matches = serial.serialseq.match('(.*)Spring(.*)') ) %]
260 [% matches.0 | html %]Spring[% matches.1 | html %]
261 [% ELSIF ( matches = serial.serialseq.match('(.*)Summer(.*)') ) %]
262 [% matches.0 | html %]Summer[% matches.1 | html %]
263 [% ELSIF ( matches = serial.serialseq.match('(.*)Fall(.*)') ) %]
264 [% matches.0 | html %]Fall[% matches.1 | html %]
265 [% ELSIF ( matches = serial.serialseq.match('(.*)Winter(.*)') ) %]
266 [% matches.0 | html %]Winter[% matches.1 | html %]
267 [% ELSIF ( matches = prediction.number.match('(.*)Spr(.*)') ) %]
268 [% matches.0 | html %]Spr[% matches.1 | html %]
269 [% ELSIF ( matches = prediction.number.match('(.*)Sum(.*)') ) %]
270 [% matches.0 | html %]Sum[% matches.1 | html %]
271 [% ELSIF ( matches = prediction.number.match('(.*)Fal(.*)') ) %]
272 [% matches.0 | html %]Fal[% matches.1 | html %]
273 [% ELSIF ( matches = prediction.number.match('(.*)Win(.*)') ) %]
274 [% matches.0 | html %]Win[% matches.1 | html %]
276 [% serial.serialseq | html %]
280 [% IF ( serial.status1 ) %]<span>Expected</span>[% END %]
281 [% IF ( serial.status2 ) %]<span>Arrived</span>[% END %]
282 [% IF ( serial.status3 ) %]<span>Late</span>[% END %]
283 [% IF ( serial.status4 ) %]<span>Missing</span>[% END %]
284 [% IF ( serial.status41 ) %]<span>Missing (never received)</span>[% END %]
285 [% IF ( serial.status42 ) %]<span>Missing (sold out)</span>[% END %]
286 [% IF ( serial.status43 ) %]<span>Missing (damaged)</span>[% END %]
287 [% IF ( serial.status44 ) %]<span>Missing (lost)</span>[% END %]
288 [% IF ( serial.status5 ) %]<span>Not issued</span>[% END %]
289 [% IF ( serial.status6 ) %]<span>Delete</span>[% END %]
290 [% IF ( serial.status7 ) %]<span>Claimed</span>[% END %]
291 [% IF ( serial.status8 ) %]<span>Stopped</span>[% END %]
294 [% serial.notes | html %]
297 [% Branches.GetName( serial.branchcode ) | html %]
301 <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>
311 <input type="hidden" name="subscriptionid" value="[% subscriptionidlist | html %]" />
317 </div> <!-- /.col-sm-10.col-sm-push-2 -->
319 <div class="col-sm-2 col-sm-pull-10">
321 [% INCLUDE 'serials-menu.inc' %]
323 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
324 </div> <!-- /.row -->
326 [% MACRO jsinclude BLOCK %]
327 [% INCLUDE 'datatables.inc' %]
329 var subscriptionid = "[% subscriptionid | html %]";
331 [% Asset.js("js/serials-toolbar.js") | $raw %]
335 function deleteIssues(subscriptionid) {
336 var serialschecked = $("form[name='edition'] input[name='serialid']:checked");
337 if (serialschecked.length > 0) {
338 var location = 'serials-collection.pl?subscriptionid='+subscriptionid+'&op=delete_confirm';
339 for (i=0; i < serialschecked.length; i++) {
340 location += '&serialid=' + serialschecked[i].value;
342 document.location = location;
344 alert(_("No serials selected"));
348 function generateNext(subscriptionid) {
349 if(confirm(_("Do you really want to generate next serial?"))){
350 document.location = 'serials-collection.pl?op=gennext&subscriptionid='+subscriptionid;
354 $(document).ready(function() {
355 if( $("#subscription_years .tab-pane.active").length < 1 ){
356 $("#subscription_years a:first").tab("show");
358 $(".subscription-year-table").dataTable($.extend(true, {}, dataTablesDefaults, {
360 { "aTargets": [ 0,-1 ], "bSortable": false, "bSearchable": false }
362 "aaSorting": [[0, 'desc']],
370 $(".CheckAll").on("click", function(e){
372 var years = $(this).data("year");
373 $("#subscription-year-" + years + " input:checkbox").prop("checked", true );
376 $(".CheckNone").on("click", function(e){
378 var years = $(this).data("year");
379 $("#subscription-year-" + years + " input:checkbox").prop("checked", false );
382 $(".generatenext").on("click", function(e){
384 var subscriptionid = $(this).data("subscriptionid");
385 generateNext( subscriptionid );
388 $(".subscription_renew").on("click", function(e){
390 var subscriptionid = $(this).data("subscriptionid");
391 popup( subscriptionid );
394 $(".print_list").on("click", function(e){
396 var url = $(this).attr("href");
397 window.open( url,'PrintSlip','width=500,height=500,toolbar=no,scrollbars=yes');
400 $('#multi_receiving').on('show', function () {
401 $(this).find(".modal-body").html($(".serials_multi_receiving")[0].outerHTML);
404 $("form[name='edition']").on('submit', function(e){
405 if ( $(this).find("input[name='serialid']:checked").size() == 0 ) {
407 alert(_("You must select at least one serial to edit"));
413 $(".delete-issues").on("click", function(e){
415 deleteIssues("[% subscriptionidlist | html %]");
422 [% INCLUDE 'intranet-bottom.inc' %]