3 [% USE AuthorisedValues %]
7 [% INCLUDE 'doc-head-open.inc' %]
8 <title>Koha › Serials › Serial collection information for [% bibliotitle | html %]</title>
9 [% INCLUDE 'doc-head-close.inc' %]
12 <body id="ser_serials-collection" class="ser">
13 [% INCLUDE 'header.inc' %]
14 [% INCLUDE 'serials-search.inc' %]
16 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
19 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
22 <a href="/cgi-bin/koha/serials/serials-home.pl">Serials</a>
25 <a href="#" aria-current="page">
26 Serial collection information for <em>[% bibliotitle | html %]</em>
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' %]
42 <h1>Serial collection information for <em>[% bibliotitle | html %]</em>
43 [% IF location %] ([% AuthorisedValues.GetByCode( 'LOC', location ) | html %]) [% END %]
44 [% IF ( callnumber ) %]callnumber: [% callnumber | html %][% END %]</h1>
48 <div class="dialog alert">
49 <h3>You are about to delete [% serialnumber | html %] serial(s). Do you want to continue?</h3>
50 <form action="/cgi-bin/koha/serials/serials-collection.pl/#">
51 [% IF countitems > 0 %]
52 <h5>Number of items available: [% countitems | html %]</h5>
54 <label>Delete associated items? <input type="checkbox" name="delitems" value="Yes" />Yes</label>
57 <input type="hidden" name="op" value="delete_confirmed" />
58 <input type="hidden" name="biblionumber" value="[% biblionumber | html %]" />
59 <input type="hidden" name="subscriptionid" value="[% subscriptionid | html %]" />
60 [% FOREACH serialid IN serialsid %]
61 <input type="hidden" name="serialid" value="[% serialid | html %]" />
63 <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> Yes, delete</button>
65 <form action="/cgi-bin/koha/serials/serials-collection.pl">
66 <input type="hidden" name="subscriptionid" value="[% subscriptionid | html %]" />
67 <button type="submit" class="deny"><i class="fa fa-fw fa-remove"></i> No, do not delete</button>
72 [% IF ( error_delitem ) %]
73 <div class="dialog alert">
74 <p><strong>Error</strong>: one or more associated items could not be deleted at this time.</p>
78 [% IF ( subscriptions ) %]
80 [% IF ( subscriptions.size == 1 ) %]
81 <caption> Subscription summary</caption>
83 <caption> Subscription summaries</caption>
86 <th>Subscription num.</th>
88 <th>Numbering pattern</th>
94 [% FOREACH subscription IN subscriptions %]
96 <td><a href="subscription-detail.pl?subscriptionid=[% subscription.subscriptionid | uri %]"># [% subscription.subscriptionid | html %]</a> </td>
97 <td>[% subscription.frequency.description | html %]</td>
98 <td>[% subscription.numberpattern.label | html %]</td>
99 <td>[% IF subscription.branchcode %][% Branches.GetName( subscription.branchcode ) | html %][% END %]</td>
100 <td> [% subscription.callnumber | html %]</td>
101 <td> [% subscription.notes | html | html_line_break %]
102 [% UNLESS subscription.closed %]
103 [% IF ( subscription.subscriptionexpired ) %]
104 <br /><span class="problem"> Subscription expired</span>
107 <br /> Subscription closed
110 [% IF ( subscription.abouttoexpire ) || ( subscription.subscriptionexpired ) %]<td class="problem actions">[% ELSE %]<td class="actions">[% END %]
111 [% UNLESS subscription.closed %]
112 [% IF ( routing && CAN_user_serials_routing ) %]
113 [% IF ( subscription.hasRouting ) %]
114 <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>
116 <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>
119 [% IF ( subscription.abouttoexpire || subscription.subscriptionexpired) %]
120 <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>
129 [% IF ( subscriptioncount > 1 ) %]
130 <tr ><td colspan="8"> <a href="serials-collection.pl?biblionumber=[% biblionumber | uri %]">See any subscription attached to this biblio</a></td>
138 [% IF ( years ) %]<form name="edition" action="serials-edit.pl" method="post">
139 <div id="subscription_years" class="toptabs numbered">
141 [% FOREACH year IN years %]
142 [% IF ( year.year ) %]
143 [% IF year.year == 'manage' %]
144 <li><a href="#subscription-year-manage">Manage</a></li>
146 <li><a href="#subscription-year-[% year.year | uri %]">[% year.year | html %]</a></li>
152 [% FOREACH year IN years %]
153 <div id="subscription-year-[% year.year | html %]">
154 [% IF ( CAN_user_serials_receive_serials ) %]
156 <div class="btn-group"><input type="submit" value="Edit serials" class="btn btn-default btn-sm" /></div>
157 [% UNLESS subscription.closed %]
158 <div class="btn-group">
159 <input type="button" value="Generate next" data-subscriptionid="[% subscriptionidlist | html %]" class="btn btn-default btn-sm generatenext" />
161 [% IF ( subscriptions.size == 1 and !serialsadditems ) %]
162 <div class="btn-group"><input type="button" value="Multi receiving" href="#multi_receiving" class="btn btn-default btn-sm" data-toggle="modal"></div>
165 <input type="button" value="Delete selected issues" class="delete-issues btn btn-default btn-sm" data-subscriptionids="[% subscriptionidlist | html %]" />
168 <span class="checkall">
169 <a class="CheckAll" href="#" data-year="[% year.year | html %]">Select all</a>
171 <span class="clearall">
172 <a class="CheckNone" href="#" data-year="[% year.year | html %]">Clear all</a>
174 <table class="subscription-year-table">
177 [% IF ( CAN_user_serials_receive_serials ) %]<th>Edit</th>[% END %]
178 [% IF ( subscriptions.size > 1 ) %]
183 <th>Date published (text)
195 [% IF ( routing ) %]<th>Routing</th>[% END %]
199 [% FOREACH serial IN year.serials %]
201 [% IF ( CAN_user_serials_receive_serials ) %]
203 [% UNLESS CAN_user_serials_receive_serials %]
206 [% IF ( serial.subscriptionexpired ) %]
207 <input type="checkbox" name="serialid" value="[% serial.serialid | html %]" disabled="disabled" />
210 [% IF serialsid.grep("${serial.serialid}").size %]
211 <input type="checkbox" name="serialid" value="[% serial.serialid | html %]" disabled checked />
213 <input type="checkbox" name="serialid" value="[% serial.serialid | html %]" disabled />
216 [% IF serial.checked %]
217 <input type="checkbox" name="serialid" value="[% serial.serialid | html %]" checked />
219 <input type="checkbox" name="serialid" value="[% serial.serialid | html %]" />
226 [% IF ( subscriptions.size > 1 ) %]
227 <td><a href="serials-collection.pl?subscriptionid=[% serial.subscriptionid | uri %]">[% serial.subscriptionid | html %]</a></td>
229 <td data-order="[% serial.publisheddate | html %]">
230 [% IF serial.publisheddate %]
231 [% serial.publisheddate | $KohaDates %]
236 <td data-order="[% serial.publisheddatetext | html %]">
237 [% IF serial.publisheddatetext %]
238 [% serial.publisheddatetext | html %]
241 <td data-order="[% serial.planneddate | html %]">
242 [% IF serial.planneddate %]
243 [% serial.planneddate | $KohaDates %]
249 [% IF ( matches = serial.serialseq.match('(.*)Spring(.*)') ) %]
250 [% matches.0 | html %]Spring[% matches.1 | html %]
251 [% ELSIF ( matches = serial.serialseq.match('(.*)Summer(.*)') ) %]
252 [% matches.0 | html %]Summer[% matches.1 | html %]
253 [% ELSIF ( matches = serial.serialseq.match('(.*)Fall(.*)') ) %]
254 [% matches.0 | html %]Fall[% matches.1 | html %]
255 [% ELSIF ( matches = serial.serialseq.match('(.*)Winter(.*)') ) %]
256 [% matches.0 | html %]Winter[% matches.1 | html %]
257 [% ELSIF ( matches = prediction.number.match('(.*)Spr(.*)') ) %]
258 [% matches.0 | html %]Spr[% matches.1 | html %]
259 [% ELSIF ( matches = prediction.number.match('(.*)Sum(.*)') ) %]
260 [% matches.0 | html %]Sum[% matches.1 | html %]
261 [% ELSIF ( matches = prediction.number.match('(.*)Fal(.*)') ) %]
262 [% matches.0 | html %]Fal[% matches.1 | html %]
263 [% ELSIF ( matches = prediction.number.match('(.*)Win(.*)') ) %]
264 [% matches.0 | html %]Win[% matches.1 | html %]
266 [% serial.serialseq | html %]
270 [% IF ( serial.status1 ) %]Expected[% END %]
271 [% IF ( serial.status2 ) %]Arrived[% END %]
272 [% IF ( serial.status3 ) %]Late[% END %]
273 [% IF ( serial.status4 ) %]Missing[% END %]
274 [% IF ( serial.status41 ) %]Missing (never received)[% END %]
275 [% IF ( serial.status42 ) %]Missing (sold out)[% END %]
276 [% IF ( serial.status43 ) %]Missing (damaged)[% END %]
277 [% IF ( serial.status44 ) %]Missing (lost)[% END %]
278 [% IF ( serial.status5 ) %]Not issued[% END %]
279 [% IF ( serial.status6 ) %]Delete[% END %]
280 [% IF ( serial.status7 ) %]Claimed[% END %]
281 [% IF ( serial.status8 ) %]Stopped[% END %]
284 [% serial.notes | html %]
287 [% Branches.GetName( serial.branchcode ) | html %]
291 <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>
300 <input type="hidden" name="subscriptionid" value="[% subscriptionidlist | html %]" />
307 </div> <!-- /.col-sm-10.col-sm-push-2 -->
309 <div class="col-sm-2 col-sm-pull-10">
311 [% INCLUDE 'serials-menu.inc' %]
313 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
314 </div> <!-- /.row -->
316 [% MACRO jsinclude BLOCK %]
317 [% INCLUDE 'datatables.inc' %]
319 var subscriptionid = "[% subscriptionid | html %]";
321 [% Asset.js("js/serials-toolbar.js") | $raw %]
325 function deleteIssues(subscriptionid) {
326 var serialschecked = $("form[name='edition'] input[name='serialid']:checked");
327 if (serialschecked.length > 0) {
328 var location = 'serials-collection.pl?subscriptionid='+subscriptionid+'&op=delete_confirm';
329 for (i=0; i < serialschecked.length; i++) {
330 location += '&serialid=' + serialschecked[i].value;
332 document.location = location;
334 alert(_("No serials selected"));
338 function generateNext(subscriptionid) {
339 if(confirm(_("Do you really want to generate next serial?"))){
340 document.location = 'serials-collection.pl?op=gennext&subscriptionid='+subscriptionid;
344 $(document).ready(function() {
345 $('#subscription_years').tabs();
346 $(".subscription-year-table").dataTable($.extend(true, {}, dataTablesDefaults, {
348 { "aTargets": [ 0,-1 ], "bSortable": false, "bSearchable": false },
349 { "sType": "title-string", "aTargets" : [ "title-string" ] }
351 "aaSorting": [[0, 'desc']],
359 $(".CheckAll").on("click", function(e){
361 var years = $(this).data("year");
362 $("#subscription-year-" + years + " input:checkbox").prop("checked", true );
365 $(".CheckNone").on("click", function(e){
367 var years = $(this).data("year");
368 $("#subscription-year-" + years + " input:checkbox").prop("checked", false );
371 $(".generatenext").on("click", function(e){
373 var subscriptionid = $(this).data("subscriptionid");
374 generateNext( subscriptionid );
377 $(".subscription_renew").on("click", function(e){
379 var subscriptionid = $(this).data("subscriptionid");
380 popup( subscriptionid );
383 $(".print_list").on("click", function(e){
385 var url = $(this).attr("href");
386 window.open( url,'PrintSlip','width=500,height=500,toolbar=no,scrollbars=yes');
389 $('#multi_receiving').on('show', function () {
390 $(this).find(".modal-body").html($(".serials_multi_receiving")[0].outerHTML);
393 $("form[name='edition']").on('submit', function(e){
394 if ( $(this).find("input[name='serialid']:checked").size() == 0 ) {
396 alert(_("You must select at least one serial to edit"));
402 $(".delete-issues").on("click", function(e){
404 deleteIssues("[% subscriptionidlist | html %]");
411 [% INCLUDE 'intranet-bottom.inc' %]