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 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/serials/serials-home.pl">Serials</a> › Serial collection information for <em>[% bibliotitle | html %]</em></div>
18 <div class="main container-fluid">
20 <div class="col-sm-10 col-sm-push-2">
23 [% INCLUDE 'modals/serials_multi_receiving.inc' %]
25 [% UNLESS ( popup ) %]
26 [% INCLUDE 'serials-toolbar.inc' %]
28 <h1>Serial collection information for <em>[% bibliotitle | html %]</em>
29 [% IF location %] ([% AuthorisedValues.GetByCode( 'LOC', location ) | html %]) [% END %]
30 [% IF ( callnumber ) %]callnumber: [% callnumber | html %][% END %]</h1>
34 <div class="dialog alert">
35 <h3>You are about to delete [% serialnumber | html %] serial(s). Do you want to continue?</h3>
36 <form action="/cgi-bin/koha/serials/serials-collection.pl/#">
37 [% IF countitems > 0 %]
38 <h5>Number of items available: [% countitems | html %]</h5>
40 <label>Delete associated items? <input type="checkbox" name="delitems" value="Yes" />Yes</label>
43 <input type="hidden" name="op" value="delete_confirmed" />
44 <input type="hidden" name="biblionumber" value="[% biblionumber | html %]" />
45 <input type="hidden" name="subscriptionid" value="[% subscriptionid | html %]" />
46 [% FOREACH serialid IN serialsid %]
47 <input type="hidden" name="serialid" value="[% serialid | html %]" />
49 <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> Yes, delete</button>
51 <form action="/cgi-bin/koha/serials/serials-collection.pl">
52 <input type="hidden" name="subscriptionid" value="[% subscriptionid | html %]" />
53 <button type="submit" class="deny"><i class="fa fa-fw fa-remove"></i> No, do not delete</button>
58 [% IF ( error_delitem ) %]
59 <div class="dialog alert">
60 <p><strong>Error</strong>: one or more associated items could not be deleted at this time.</p>
64 [% IF ( subscriptions ) %]
66 [% IF ( subscriptions.size == 1 ) %]
67 <caption> Subscription summary</caption>
69 <caption> Subscription summaries</caption>
72 <th>Subscription num.</th>
74 <th>Numbering pattern</th>
80 [% FOREACH subscription IN subscriptions %]
82 <td><a href="subscription-detail.pl?subscriptionid=[% subscription.subscriptionid | uri %]"># [% subscription.subscriptionid | html %]</a> </td>
83 <td>[% subscription.frequency.description | html %]</td>
84 <td>[% subscription.numberpattern.label | html %]</td>
85 <td>[% IF subscription.branchcode %][% Branches.GetName( subscription.branchcode ) | html %][% END %]</td>
86 <td> [% subscription.callnumber | html %]</td>
87 <td> [% subscription.notes | html | html_line_break %]
88 [% UNLESS subscription.closed %]
89 [% IF ( subscription.subscriptionexpired ) %]
90 <br /><span class="problem"> Subscription expired</span>
93 <br /> Subscription closed
96 [% IF ( subscription.abouttoexpire ) || ( subscription.subscriptionexpired ) %]<td class="problem actions">[% ELSE %]<td class="actions">[% END %]
97 [% UNLESS subscription.closed %]
98 [% IF ( routing && CAN_user_serials_routing ) %]
99 [% IF ( subscription.hasRouting ) %]
100 <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>
102 <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>
105 [% IF ( subscription.abouttoexpire || subscription.subscriptionexpired) %]
106 <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>
115 [% IF ( subscriptioncount > 1 ) %]
116 <tr ><td colspan="8"> <a href="serials-collection.pl?biblionumber=[% biblionumber | uri %]">See any subscription attached to this biblio</a></td>
124 [% IF ( years ) %]<form name="edition" action="serials-edit.pl" method="post">
125 <div id="subscription_years" class="toptabs numbered">
127 [% FOREACH year IN years %]
128 [% IF ( year.year ) %]
129 [% IF year.year == 'manage' %]
130 <li><a href="#subscription-year-manage">Manage</a></li>
132 <li><a href="#subscription-year-[% year.year | uri %]">[% year.year | html %]</a></li>
138 [% FOREACH year IN years %]
139 <div id="subscription-year-[% year.year | html %]">
140 [% IF ( CAN_user_serials_receive_serials ) %]
142 <div class="btn-group"><input type="submit" value="Edit serials" class="btn btn-default btn-sm" /></div>
143 [% UNLESS subscription.closed %]
144 <div class="btn-group">
145 <input type="button" value="Generate next" data-subscriptionid="[% subscriptionidlist | html %]" class="btn btn-default btn-sm generatenext" />
147 [% IF ( subscriptions.size == 1 and !serialsadditems ) %]
148 <div class="btn-group"><input type="button" value="Multi receiving" href="#multi_receiving" class="btn btn-default btn-sm" data-toggle="modal"></div>
151 <input type="button" value="Delete selected issues" class="delete-issues btn btn-default btn-sm" data-subscriptionids="[% subscriptionidlist | html %]" />
154 <span class="checkall">
155 <a class="CheckAll" href="#" data-year="[% year.year | html %]">Select all</a>
157 <span class="clearall">
158 <a class="CheckNone" href="#" data-year="[% year.year | html %]">Clear all</a>
160 <table class="subscription-year-table">
163 [% IF ( CAN_user_serials_receive_serials ) %]<th>Edit</th>[% END %]
164 [% IF ( subscriptions.size > 1 ) %]
167 <th class="title-string">Date published
169 <th class="title-string">Date published (text)
171 <th class="title-string">Date received
181 [% IF ( routing ) %]<th>Routing</th>[% END %]
185 [% FOREACH serial IN year.serials %]
187 [% IF ( CAN_user_serials_receive_serials ) %]
189 [% UNLESS CAN_user_serials_receive_serials %]
192 [% IF ( serial.subscriptionexpired ) %]
193 <input type="checkbox" name="serialid" value="[% serial.serialid | html %]" disabled="disabled" />
196 [% IF serialsid.grep("${serial.serialid}").size %]
197 <input type="checkbox" name="serialid" value="[% serial.serialid | html %]" disabled checked />
199 <input type="checkbox" name="serialid" value="[% serial.serialid | html %]" disabled />
202 [% IF serial.checked %]
203 <input type="checkbox" name="serialid" value="[% serial.serialid | html %]" checked />
205 <input type="checkbox" name="serialid" value="[% serial.serialid | html %]" />
212 [% IF ( subscriptions.size > 1 ) %]
213 <td><a href="serials-collection.pl?subscriptionid=[% serial.subscriptionid | uri %]">[% serial.subscriptionid | html %]</a></td>
216 <span title="[% serial.publisheddate | html %]">
217 [% IF serial.publisheddate %]
218 [% serial.publisheddate | $KohaDates %]
225 [% IF serial.publisheddatetext %]
226 <span title="[% serial.publisheddatetext | html %]">
227 [% serial.publisheddatetext | html %]
232 <span title="[% serial.planneddate | html %]">
233 [% IF serial.planneddate %]
234 [% serial.planneddate | $KohaDates %]
241 [% IF ( matches = serial.serialseq.match('(.*)Spring(.*)') ) %]
242 [% matches.0 | html %]Spring[% matches.1 | html %]
243 [% ELSIF ( matches = serial.serialseq.match('(.*)Summer(.*)') ) %]
244 [% matches.0 | html %]Summer[% matches.1 | html %]
245 [% ELSIF ( matches = serial.serialseq.match('(.*)Fall(.*)') ) %]
246 [% matches.0 | html %]Fall[% matches.1 | html %]
247 [% ELSIF ( matches = serial.serialseq.match('(.*)Winter(.*)') ) %]
248 [% matches.0 | html %]Winter[% matches.1 | html %]
249 [% ELSIF ( matches = prediction.number.match('(.*)Spr(.*)') ) %]
250 [% matches.0 | html %]Spr[% matches.1 | html %]
251 [% ELSIF ( matches = prediction.number.match('(.*)Sum(.*)') ) %]
252 [% matches.0 | html %]Sum[% matches.1 | html %]
253 [% ELSIF ( matches = prediction.number.match('(.*)Fal(.*)') ) %]
254 [% matches.0 | html %]Fal[% matches.1 | html %]
255 [% ELSIF ( matches = prediction.number.match('(.*)Win(.*)') ) %]
256 [% matches.0 | html %]Win[% matches.1 | html %]
258 [% serial.serialseq | html %]
262 [% IF ( serial.status1 ) %]Expected[% END %]
263 [% IF ( serial.status2 ) %]Arrived[% END %]
264 [% IF ( serial.status3 ) %]Late[% END %]
265 [% IF ( serial.status4 ) %]Missing[% END %]
266 [% IF ( serial.status41 ) %]Missing (never received)[% END %]
267 [% IF ( serial.status42 ) %]Missing (sold out)[% END %]
268 [% IF ( serial.status43 ) %]Missing (damaged)[% END %]
269 [% IF ( serial.status44 ) %]Missing (lost)[% END %]
270 [% IF ( serial.status5 ) %]Not issued[% END %]
271 [% IF ( serial.status6 ) %]Delete[% END %]
272 [% IF ( serial.status7 ) %]Claimed[% END %]
273 [% IF ( serial.status8 ) %]Stopped[% END %]
276 [% serial.notes | html %]
279 [% Branches.GetName( serial.branchcode ) | html %]
283 <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>
292 <input type="hidden" name="subscriptionid" value="[% subscriptionidlist | html %]" />
299 </div> <!-- /.col-sm-10.col-sm-push-2 -->
301 <div class="col-sm-2 col-sm-pull-10">
303 [% INCLUDE 'serials-menu.inc' %]
305 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
306 </div> <!-- /.row -->
308 [% MACRO jsinclude BLOCK %]
309 [% INCLUDE 'datatables.inc' %]
311 var subscriptionid = "[% subscriptionid | html %]";
313 [% Asset.js("js/serials-toolbar.js") | $raw %]
317 function deleteIssues(subscriptionid) {
318 var serialschecked = $("form[name='edition'] input[name='serialid']:checked");
319 if (serialschecked.length > 0) {
320 var location = 'serials-collection.pl?subscriptionid='+subscriptionid+'&op=delete_confirm';
321 for (i=0; i < serialschecked.length; i++) {
322 location += '&serialid=' + serialschecked[i].value;
324 document.location = location;
326 alert(_("No serials selected"));
330 function generateNext(subscriptionid) {
331 if(confirm(_("Do you really want to generate next serial?"))){
332 document.location = 'serials-collection.pl?op=gennext&subscriptionid='+subscriptionid;
336 $(document).ready(function() {
337 $('#subscription_years').tabs();
338 $(".subscription-year-table").dataTable($.extend(true, {}, dataTablesDefaults, {
340 { "aTargets": [ 0,-1 ], "bSortable": false, "bSearchable": false },
341 { "sType": "title-string", "aTargets" : [ "title-string" ] }
343 "aaSorting": [[0, 'desc']],
351 $(".CheckAll").on("click", function(e){
353 var years = $(this).data("year");
354 $("#subscription-year-" + years + " input:checkbox").prop("checked", true );
357 $(".CheckNone").on("click", function(e){
359 var years = $(this).data("year");
360 $("#subscription-year-" + years + " input:checkbox").prop("checked", false );
363 $(".generatenext").on("click", function(e){
365 var subscriptionid = $(this).data("subscriptionid");
366 generateNext( subscriptionid );
369 $(".subscription_renew").on("click", function(e){
371 var subscriptionid = $(this).data("subscriptionid");
372 popup( subscriptionid );
375 $(".print_list").on("click", function(e){
377 var url = $(this).attr("href");
378 window.open( url,'PrintSlip','width=500,height=500,toolbar=no,scrollbars=yes');
381 $('#multi_receiving').on('show', function () {
382 $(this).find(".modal-body").html($(".serials_multi_receiving")[0].outerHTML);
385 $("form[name='edition']").on('submit', function(e){
386 if ( $(this).find("input[name='serialid']:checked").size() == 0 ) {
388 alert(_("You must select at least one serial to edit"));
394 $(".delete-issues").on("click", function(e){
396 deleteIssues("[% subscriptionidlist | html %]");
403 [% INCLUDE 'intranet-bottom.inc' %]