Lines 102-113
Link Here
|
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> |
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> |
103 |
[% END %] |
103 |
[% END %] |
104 |
[% END %] |
104 |
[% END %] |
105 |
[% IF ( subscription.abouttoexpire ) %]<a class="btn btn-default btn-xs" href="/cgi-bin/koha/serials/subscription-renew.pl?subscriptionid=[% subscription.subscriptionid | html %]" onclick="popup([% subscription.subscriptionid | html %]); return false;"><i class="fa fa-refresh"></i> Renew</a> |
105 |
[% IF ( subscription.abouttoexpire || subscription.subscriptionexpired) %] |
106 |
[% ELSE %] |
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> |
107 |
[% IF ( subscription.subscriptionexpired ) %]<a class="btn btn-default btn-xs" href="/cgi-bin/koha/serials/subscription-renew.pl?subscriptionid=[% subscription.subscriptionid | html %]" onclick="popup([% subscription.subscriptionid | html %]); return false;"><i class="fa fa-refresh"></i> Renew</a> |
|
|
108 |
[% ELSE %] |
109 |
|
110 |
[% END %] |
111 |
[% END %] |
107 |
[% END %] |
112 |
[% ELSE %] |
108 |
[% ELSE %] |
113 |
|
109 |
|
Lines 145-151
Link Here
|
145 |
<p> |
141 |
<p> |
146 |
<div class="btn-group"><input type="submit" value="Edit serials" class="btn btn-default btn-sm" /></div> |
142 |
<div class="btn-group"><input type="submit" value="Edit serials" class="btn btn-default btn-sm" /></div> |
147 |
[% UNLESS subscription.closed %] |
143 |
[% UNLESS subscription.closed %] |
148 |
<div class="btn-group"><input type="button" value="Generate next" onclick="javascription:generateNext([% subscriptionidlist | html %])" class="btn btn-default btn-sm" /></div> |
144 |
<div class="btn-group"> |
|
|
145 |
<input type="button" value="Generate next" data-subscriptionid="[% subscriptionidlist | html %]" class="btn btn-default btn-sm generatenext" /> |
146 |
</div> |
149 |
[% IF ( subscriptions.size == 1 and !serialsadditems ) %] |
147 |
[% IF ( subscriptions.size == 1 and !serialsadditems ) %] |
150 |
<div class="btn-group"><input type="button" value="Multi receiving" href="#multi_receiving" class="btn btn-default btn-sm" data-toggle="modal"></div> |
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 |
[% END %] |
149 |
[% END %] |
Lines 154-163
Link Here
|
154 |
</p> |
152 |
</p> |
155 |
[% END %] |
153 |
[% END %] |
156 |
<span class="checkall"> |
154 |
<span class="checkall"> |
157 |
<a class="CheckAll" href="#" onclick="CheckAll('subscription-year-[% year.year | html %]'); return false;">Select all</a> |
155 |
<a class="CheckAll" href="#" data-year="[% year.year | html %]">Select all</a> |
158 |
</span> | |
156 |
</span> | |
159 |
<span class="clearall"> |
157 |
<span class="clearall"> |
160 |
<a class="CheckNone" href="#" onclick="CheckNone('subscription-year-[% year.year | html %]'); return false;">Clear all</a> |
158 |
<a class="CheckNone" href="#" data-year="[% year.year | html %]">Clear all</a> |
161 |
</span> |
159 |
</span> |
162 |
<table class="subscription-year-table"> |
160 |
<table class="subscription-year-table"> |
163 |
<thead> |
161 |
<thead> |
Lines 278-284
Link Here
|
278 |
</td> |
276 |
</td> |
279 |
[% IF ( routing ) %] |
277 |
[% IF ( routing ) %] |
280 |
<td class="actions"> |
278 |
<td class="actions"> |
281 |
<a href="" onclick="print_slip([% serial.subscriptionid | html %], '[% serial.serialseq.replace("'", "\\'") | html %] ([% serial.publisheddate | $KohaDates %])'); return false" class="btn btn-default btn-xs"><i class="fa fa-print"></i> Print list</a> |
279 |
<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> |
282 |
</td> |
280 |
</td> |
283 |
[% END %] |
281 |
[% END %] |
284 |
</tr> |
282 |
</tr> |
Lines 329-357
Link Here
|
329 |
} |
327 |
} |
330 |
} |
328 |
} |
331 |
|
329 |
|
332 |
function print_slip(subscriptionid,issue){ |
|
|
333 |
var myurl = 'routing-preview.pl?ok=1&subscriptionid='+subscriptionid+'&issue='+issue; |
334 |
window.open(myurl,'PrintSlip','width=500,height=500,toolbar=no,scrollbars=yes'); |
335 |
} |
336 |
|
337 |
function popup(subscriptionid) { |
338 |
newin=window.open('subscription-renew.pl?mode=popup&subscriptionid='+subscriptionid,'popup','width=500,height=400,toolbar=false,scrollbars=yes'); |
339 |
} |
340 |
|
341 |
function generateNext(subscriptionid) { |
330 |
function generateNext(subscriptionid) { |
342 |
if(confirm(_("Do you really want to generate next serial?"))){ |
331 |
if(confirm(_("Do you really want to generate next serial?"))){ |
343 |
document.location = 'serials-collection.pl?op=gennext&subscriptionid='+subscriptionid; |
332 |
document.location = 'serials-collection.pl?op=gennext&subscriptionid='+subscriptionid; |
344 |
} |
333 |
} |
345 |
} |
334 |
} |
346 |
|
335 |
|
347 |
function CheckAll( node ) { |
|
|
348 |
$("#"+node).checkCheckboxes(); |
349 |
return false; |
350 |
} |
351 |
function CheckNone( node ) { |
352 |
$("#"+node).unCheckCheckboxes(); |
353 |
return false; |
354 |
} |
355 |
$(document).ready(function() { |
336 |
$(document).ready(function() { |
356 |
$('#subscription_years').tabs(); |
337 |
$('#subscription_years').tabs(); |
357 |
$(".subscription-year-table").dataTable($.extend(true, {}, dataTablesDefaults, { |
338 |
$(".subscription-year-table").dataTable($.extend(true, {}, dataTablesDefaults, { |
Lines 367-372
Link Here
|
367 |
"bFilter": false, |
348 |
"bFilter": false, |
368 |
} )); |
349 |
} )); |
369 |
|
350 |
|
|
|
351 |
$(".CheckAll").on("click", function(e){ |
352 |
e.preventDefault(); |
353 |
var years = $(this).data("year"); |
354 |
$("#subscription-year-" + years ).checkCheckboxes(); |
355 |
}); |
356 |
|
357 |
$(".CheckNone").on("click", function(e){ |
358 |
e.preventDefault(); |
359 |
var years = $(this).data("year"); |
360 |
$("#subscription-year-" + years ).unCheckCheckboxes(); |
361 |
}); |
362 |
|
363 |
$(".generatenext").on("click", function(e){ |
364 |
e.preventDefault(); |
365 |
var subscriptionid = $(this).data("subscriptionid"); |
366 |
generateNext( subscriptionid ); |
367 |
}); |
368 |
|
369 |
$(".subscription_renew").on("click", function(e){ |
370 |
e.preventDefault(); |
371 |
var subscriptionid = $(this).data("subscriptionid"); |
372 |
popup( subscriptionid ); |
373 |
}); |
374 |
|
375 |
$(".print_list").on("click", function(e){ |
376 |
e.preventDefault(); |
377 |
var url = $(this).attr("href"); |
378 |
window.open( url,'PrintSlip','width=500,height=500,toolbar=no,scrollbars=yes'); |
379 |
}); |
380 |
|
370 |
$('#multi_receiving').on('show', function () { |
381 |
$('#multi_receiving').on('show', function () { |
371 |
$(this).find(".modal-body").html($(".serials_multi_receiving")[0].outerHTML); |
382 |
$(this).find(".modal-body").html($(".serials_multi_receiving")[0].outerHTML); |
372 |
}); |
383 |
}); |
373 |
- |
|
|