From c0569f0b1e3d955869db411fc7456e6e7722dbd7 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 22 Apr 2014 16:03:33 +0200 Subject: [PATCH] Bug 11578: (follow-up) hide filters if a budget (budgetperiod) is chosen If a budget_period_id is given, the filters should not be displayed. Moreover, it does not make sense to display the links for displaying/hiding inactive budgets in this case. Signed-off-by: Martin Renvoize Signed-off-by: Galen Charlton --- .../prog/en/modules/admin/aqbudgets.tt | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tt index 9f96af5e41..880ce2e221 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tt @@ -202,19 +202,21 @@ var MSG_PARENT_BENEATH_BUDGET = "- " + _("New budget-parent is beneath budget") $(oTable).treetable('collapseAll'); }); - $("#hide_inactive").click(function(e){ + [% UNLESS budget_period_id %] + $("#hide_inactive").click(function(e){ e.preventDefault(); oTable.fnFilter( 0, 0 ); // Hide active=0 - }); - $("#show_inactive").click(function(e){ + }); + $("#show_inactive").click(function(e){ e.preventDefault(); oTable.fnFilter( '', 0 ); - }); + }); + $("#hide_inactive").click(); + [% END %] $("#filterbutton").click(function() { $("#fundfilters").slideToggle(0); }); - $("#hide_inactive").click(); }); //]]> @@ -264,12 +266,14 @@ var MSG_PARENT_BENEATH_BUDGET = "- " + _("New budget-parent is beneath budget") [% IF budgets %] - + + [% END %] -- 2.39.5
+ [% UNLESS budget_period_id %] + Expand all | Collapse all | Hide inactive budgets | Show inactive budgets -
Active