@@ -, +, @@ template - Locate or create a subscription for which an item record is NOT created when receiving. - On the serial collection page for this subscription, test that the "Multi receiving" button works correctly. - For any subscription, test that the "Generate next" button works correctly. - In each tab, test that the "select all" and "clear all" links work correctly and affect only that tab. - On a subscription which has expired, test that the "Renew" button works correctly. --- .../prog/en/modules/serials/serials-collection.tt | 65 +++++++++++++--------- 1 file changed, 38 insertions(+), 27 deletions(-) --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt @@ -102,12 +102,8 @@ Create routing list [% END %] [% END %] - [% IF ( subscription.abouttoexpire ) %] Renew - [% ELSE %] - [% IF ( subscription.subscriptionexpired ) %] Renew - [% ELSE %] -   - [% END %] + [% IF ( subscription.abouttoexpire || subscription.subscriptionexpired) %] + Renew [% END %] [% ELSE %]   @@ -145,7 +141,9 @@

[% UNLESS subscription.closed %] -
+
+ +
[% IF ( subscriptions.size == 1 and !serialsadditems ) %] 
[% END %] @@ -154,10 +152,10 @@

[% END %] - Select all + Select all | - Clear all + Clear all @@ -278,7 +276,7 @@ [% IF ( routing ) %] [% END %] @@ -329,29 +327,12 @@ } } - function print_slip(subscriptionid,issue){ - var myurl = 'routing-preview.pl?ok=1&subscriptionid='+subscriptionid+'&issue='+issue; - window.open(myurl,'PrintSlip','width=500,height=500,toolbar=no,scrollbars=yes'); - } - - function popup(subscriptionid) { - newin=window.open('subscription-renew.pl?mode=popup&subscriptionid='+subscriptionid,'popup','width=500,height=400,toolbar=false,scrollbars=yes'); - } - function generateNext(subscriptionid) { if(confirm(_("Do you really want to generate next serial?"))){ document.location = 'serials-collection.pl?op=gennext&subscriptionid='+subscriptionid; } } - function CheckAll( node ) { - $("#"+node).checkCheckboxes(); - return false; - } - function CheckNone( node ) { - $("#"+node).unCheckCheckboxes(); - return false; - } $(document).ready(function() { $('#subscription_years').tabs(); $(".subscription-year-table").dataTable($.extend(true, {}, dataTablesDefaults, { @@ -367,6 +348,36 @@ "bFilter": false, } )); + $(".CheckAll").on("click", function(e){ + e.preventDefault(); + var years = $(this).data("year"); + $("#subscription-year-" + years ).checkCheckboxes(); + }); + + $(".CheckNone").on("click", function(e){ + e.preventDefault(); + var years = $(this).data("year"); + $("#subscription-year-" + years ).unCheckCheckboxes(); + }); + + $(".generatenext").on("click", function(e){ + e.preventDefault(); + var subscriptionid = $(this).data("subscriptionid"); + generateNext( subscriptionid ); + }); + + $(".subscription_renew").on("click", function(e){ + e.preventDefault(); + var subscriptionid = $(this).data("subscriptionid"); + popup( subscriptionid ); + }); + + $(".print_list").on("click", function(e){ + e.preventDefault(); + var url = $(this).attr("href"); + window.open( url,'PrintSlip','width=500,height=500,toolbar=no,scrollbars=yes'); + }); + $('#multi_receiving').on('show', function () { $(this).find(".modal-body").html($(".serials_multi_receiving")[0].outerHTML); }); --
- Print list + Print list