|
Lines 71-82
Link Here
|
| 71 |
<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> |
71 |
<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> |
| 72 |
[% END %] |
72 |
[% END %] |
| 73 |
[% END %] |
73 |
[% END %] |
| 74 |
[% 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> |
74 |
[% IF ( subscription.abouttoexpire || subscription.subscriptionexpired) %] |
| 75 |
[% ELSE %] |
75 |
<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> |
| 76 |
[% 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> |
|
|
| 77 |
[% ELSE %] |
| 78 |
|
| 79 |
[% END %] |
| 80 |
[% END %] |
76 |
[% END %] |
| 81 |
[% ELSE %] |
77 |
[% ELSE %] |
| 82 |
|
78 |
|
|
Lines 114-120
Link Here
|
| 114 |
<p> |
110 |
<p> |
| 115 |
<div class="btn-group"><input type="submit" value="Edit serials" class="btn btn-default btn-sm" /></div> |
111 |
<div class="btn-group"><input type="submit" value="Edit serials" class="btn btn-default btn-sm" /></div> |
| 116 |
[% UNLESS subscription.closed %] |
112 |
[% UNLESS subscription.closed %] |
| 117 |
<div class="btn-group"><input type="button" value="Generate next" onclick="javascription:generateNext([% subscriptionidlist | html %])" class="btn btn-default btn-sm" /></div> |
113 |
<div class="btn-group"> |
|
|
114 |
<input type="button" value="Generate next" data-subscriptionid="[% subscriptionidlist | html %]" class="btn btn-default btn-sm generatenext" /> |
| 115 |
</div> |
| 118 |
[% IF ( subscriptions.size == 1 and !serialsadditems ) %] |
116 |
[% IF ( subscriptions.size == 1 and !serialsadditems ) %] |
| 119 |
<div class="btn-group"><input type="button" value="Multi receiving" href="#multi_receiving" class="btn btn-default btn-sm" data-toggle="modal"></div> |
117 |
<div class="btn-group"><input type="button" value="Multi receiving" href="#multi_receiving" class="btn btn-default btn-sm" data-toggle="modal"></div> |
| 120 |
[% END %] |
118 |
[% END %] |
|
Lines 122-131
Link Here
|
| 122 |
</p> |
120 |
</p> |
| 123 |
[% END %] |
121 |
[% END %] |
| 124 |
<span class="checkall"> |
122 |
<span class="checkall"> |
| 125 |
<a class="CheckAll" href="#" onclick="CheckAll('subscription-year-[% year.year | html %]'); return false;">Select all</a> |
123 |
<a class="CheckAll" href="#" data-year="[% year.year | html %]">Select all</a> |
| 126 |
</span> | |
124 |
</span> | |
| 127 |
<span class="clearall"> |
125 |
<span class="clearall"> |
| 128 |
<a class="CheckNone" href="#" onclick="CheckNone('subscription-year-[% year.year | html %]'); return false;">Clear all</a> |
126 |
<a class="CheckNone" href="#" data-year="[% year.year | html %]">Clear all</a> |
| 129 |
</span> |
127 |
</span> |
| 130 |
<table class="subscription-year-table"> |
128 |
<table class="subscription-year-table"> |
| 131 |
<thead> |
129 |
<thead> |
|
Lines 242-248
Link Here
|
| 242 |
</td> |
240 |
</td> |
| 243 |
[% IF ( routing ) %] |
241 |
[% IF ( routing ) %] |
| 244 |
<td class="actions"> |
242 |
<td class="actions"> |
| 245 |
<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> |
243 |
<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> |
| 246 |
</td> |
244 |
</td> |
| 247 |
[% END %] |
245 |
[% END %] |
| 248 |
</tr> |
246 |
</tr> |
|
Lines 280-290
Link Here
|
| 280 |
|
278 |
|
| 281 |
<script> |
279 |
<script> |
| 282 |
|
280 |
|
| 283 |
function print_slip(subscriptionid,issue){ |
|
|
| 284 |
var myurl = 'routing-preview.pl?ok=1&subscriptionid='+subscriptionid+'&issue='+issue; |
| 285 |
window.open(myurl,'PrintSlip','width=500,height=500,toolbar=no,scrollbars=yes'); |
| 286 |
} |
| 287 |
|
| 288 |
function popup(subscriptionid) { |
281 |
function popup(subscriptionid) { |
| 289 |
newin=window.open('subscription-renew.pl?mode=popup&subscriptionid='+subscriptionid,'popup','width=500,height=400,toolbar=false,scrollbars=yes'); |
282 |
newin=window.open('subscription-renew.pl?mode=popup&subscriptionid='+subscriptionid,'popup','width=500,height=400,toolbar=false,scrollbars=yes'); |
| 290 |
} |
283 |
} |
|
Lines 295-308
Link Here
|
| 295 |
} |
288 |
} |
| 296 |
} |
289 |
} |
| 297 |
|
290 |
|
| 298 |
function CheckAll( node ) { |
|
|
| 299 |
$("#"+node).checkCheckboxes(); |
| 300 |
return false; |
| 301 |
} |
| 302 |
function CheckNone( node ) { |
| 303 |
$("#"+node).unCheckCheckboxes(); |
| 304 |
return false; |
| 305 |
} |
| 306 |
$(document).ready(function() { |
291 |
$(document).ready(function() { |
| 307 |
$('#subscription_years').tabs(); |
292 |
$('#subscription_years').tabs(); |
| 308 |
$(".subscription-year-table").dataTable($.extend(true, {}, dataTablesDefaults, { |
293 |
$(".subscription-year-table").dataTable($.extend(true, {}, dataTablesDefaults, { |
|
Lines 318-323
Link Here
|
| 318 |
"bFilter": false, |
303 |
"bFilter": false, |
| 319 |
} )); |
304 |
} )); |
| 320 |
|
305 |
|
|
|
306 |
$(".CheckAll").on("click", function(e){ |
| 307 |
e.preventDefault(); |
| 308 |
var years = $(this).data("year"); |
| 309 |
$("#subscription-year-" + years ).checkCheckboxes(); |
| 310 |
}); |
| 311 |
|
| 312 |
$(".CheckNone").on("click", function(e){ |
| 313 |
e.preventDefault(); |
| 314 |
var years = $(this).data("year"); |
| 315 |
$("#subscription-year-" + years ).unCheckCheckboxes(); |
| 316 |
}); |
| 317 |
|
| 318 |
$(".generatenext").on("click", function(e){ |
| 319 |
e.preventDefault(); |
| 320 |
var subscriptionid = $(this).data("subscriptionid"); |
| 321 |
generateNext( subscriptionid ); |
| 322 |
}); |
| 323 |
|
| 324 |
$(".subscription_renew").on("click", function(e){ |
| 325 |
e.preventDefault(); |
| 326 |
var subscriptionid = $(this).data("subscriptionid"); |
| 327 |
popup( subscriptionid ); |
| 328 |
}); |
| 329 |
|
| 330 |
$(".print_list").on("click", function(e){ |
| 331 |
e.preventDefault(); |
| 332 |
var url = $(this).attr("href"); |
| 333 |
window.open( url,'PrintSlip','width=500,height=500,toolbar=no,scrollbars=yes'); |
| 334 |
}); |
| 335 |
|
| 321 |
$('#multi_receiving').on('show', function () { |
336 |
$('#multi_receiving').on('show', function () { |
| 322 |
$(this).find(".modal-body").html($(".serials_multi_receiving")[0].outerHTML); |
337 |
$(this).find(".modal-body").html($(".serials_multi_receiving")[0].outerHTML); |
| 323 |
}); |
338 |
}); |
| 324 |
- |
|
|