From 323b05f4de37cbdcf6a118baeb9904180e503798 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pedro=20R=C3=ADos=20Flores?= Date: Fri, 29 Sep 2017 12:30:02 +0200 Subject: [PATCH 1/3] Issue #1901: Budget related entries in Management shouldn't appear if budgets are globally disabled. --- app/views/management/_menu.html.erb | 48 ++++++++++++++++------------- 1 file changed, 27 insertions(+), 21 deletions(-) diff --git a/app/views/management/_menu.html.erb b/app/views/management/_menu.html.erb index 050e5eb7f..e70ec9ee5 100644 --- a/app/views/management/_menu.html.erb +++ b/app/views/management/_menu.html.erb @@ -44,21 +44,25 @@ <% end %> -
  • > - <%= link_to create_investments_management_budgets_path do %> - - <%= t("management.menu.create_budget_investment") %> - <% end %> -
  • + <% if Setting['feature.budgets'] %> +
  • > + <%= link_to create_investments_management_budgets_path do %> + + <%= t("management.menu.create_budget_investment") %> + <% end %> +
  • + <% end %> -
  • > - <%= link_to support_investments_management_budgets_path do %> - - <%= t("management.menu.support_budget_investments") %> - <% end %> -
  • + <% if Setting['feature.budgets'] %> +
  • > + <%= link_to support_investments_management_budgets_path do %> + + <%= t("management.menu.support_budget_investments") %> + <% end %> +
  • + <% end %>
  • > <%= link_to print_management_proposals_path do %> @@ -74,13 +78,15 @@ <% end %>
  • -
  • > - <%= link_to print_investments_management_budgets_path do %> - - <%= t("management.menu.print_budget_investments") %> - <% end %> -
  • + <% if Setting['feature.budgets'] %> +
  • > + <%= link_to print_investments_management_budgets_path do %> + + <%= t("management.menu.print_budget_investments") %> + <% end %> +
  • + <% end %>
  • From 693030ff1791d93824e938907fc512399286d033 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pedro=20R=C3=ADos=20Flores?= Date: Mon, 9 Oct 2017 12:26:34 +0200 Subject: [PATCH 2/3] Wrapped two links under the same if clause. --- app/views/management/_menu.html.erb | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/views/management/_menu.html.erb b/app/views/management/_menu.html.erb index e70ec9ee5..51df9518a 100644 --- a/app/views/management/_menu.html.erb +++ b/app/views/management/_menu.html.erb @@ -52,9 +52,7 @@ <%= t("management.menu.create_budget_investment") %> <% end %>
  • - <% end %> - <% if Setting['feature.budgets'] %>
  • > <%= link_to support_investments_management_budgets_path do %> From 87d4fa92b41bc87ccd2b5649cb694e174af00acf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pedro=20R=C3=ADos=20Flores?= Date: Mon, 9 Oct 2017 13:09:09 +0200 Subject: [PATCH 3/3] Wrapped the last link under the same if clause. --- app/views/management/_menu.html.erb | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/app/views/management/_menu.html.erb b/app/views/management/_menu.html.erb index 51df9518a..b01bbaf0c 100644 --- a/app/views/management/_menu.html.erb +++ b/app/views/management/_menu.html.erb @@ -60,6 +60,14 @@ <%= t("management.menu.support_budget_investments") %> <% end %>
  • + +
  • > + <%= link_to print_investments_management_budgets_path do %> + + <%= t("management.menu.print_budget_investments") %> + <% end %> +
  • <% end %>
  • > @@ -76,17 +84,6 @@ <% end %>
  • - <% if Setting['feature.budgets'] %> -
  • > - <%= link_to print_investments_management_budgets_path do %> - - <%= t("management.menu.print_budget_investments") %> - <% end %> -
  • - <% end %> - -
  • <%= link_to new_management_user_invite_path do %>