diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-detail.tt
index a30270abf7..d7f7cfdc09 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-detail.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-detail.tt
@@ -351,7 +351,10 @@
Hide already received orders
- | Show all orders
+ | Show all orders
+ | Expand all
+ | Collapse all
+
@@ -498,9 +501,20 @@
[% IF orders_grouped.size %]
$(table).treetable({
- expandable: true
+ expandable: true,
+ initialState: 'expanded',
});
$(table).treetable('expandAll');
+
+ $("#expand_all").click(function(e){
+ e.preventDefault();
+ $(table).treetable('expandAll');
+ });
+ $("#collapse_all").click(function(e){
+ e.preventDefault();
+ $(table).treetable('collapseAll');
+ });
+
[% END %]
$("#hide_received_orders").click(function(e){