From 5eed442f26222b138f0c47b2f1c20b1afd797679 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 22 Apr 2014 16:03:33 +0200 Subject: [PATCH] Bug 11578: 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. --- .../intranet-tmpl/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 9f96af5..880ce2e 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 %] -- 1.7.10.4
+ [% UNLESS budget_period_id %] + Expand all | Collapse all | Hide inactive budgets | Show inactive budgets -
Active