diff --git a/app/helpers/budgets_helper.rb b/app/helpers/budgets_helper.rb index fc20c36a9..8cff4b72b 100644 --- a/app/helpers/budgets_helper.rb +++ b/app/helpers/budgets_helper.rb @@ -65,6 +65,7 @@ module BudgetsHelper end def current_budget_map_locations + return unless current_budget.present? MapLocation.where(investment_id: current_budget.investments).map { |l| l.json_data } end end diff --git a/app/views/budgets/index.html.erb b/app/views/budgets/index.html.erb index ff0a7a505..360e79d72 100644 --- a/app/views/budgets/index.html.erb +++ b/app/views/budgets/index.html.erb @@ -3,168 +3,172 @@ <%= render "shared/canonical", href: budgets_url %> <% end %> -
+ <%= link_to t("budgets.index.section_header.help"), "#section_help" %> +
- <%= link_to t("budgets.index.section_header.help"), "#section_help" %> -
-- <%= t("budgets.show.phase") %> -
-+ <%= t("budgets.show.phase") %> +
+
- <% show_links = show_links_to_budget_investments(current_budget) %>
- <% if show_links %>
- <%= link_to budget_investments_path(current_budget.id) do %>
- <%= t("budgets.index.investment_proyects") %>
- <% end %>
- <% end %>
- <%= link_to budget_investments_path(budget_id: current_budget.id, filter: 'unfeasible') do %>
- <%= t("budgets.index.unfeasible_investment_proyects") %>
- <% end %>
- <% if show_links %>
- <%= link_to budget_investments_path(budget_id: current_budget.id, filter: 'unselected') do %>
- <%= t("budgets.index.not_selected_investment_proyects") %>
- <% end %>
- <% end %>
-
+ <% show_links = show_links_to_budget_investments(current_budget) %>
+ <% if show_links %>
+ <%= link_to budget_investments_path(current_budget.id) do %>
+ <%= t("budgets.index.investment_proyects") %>
+ <% end %>
+ <% end %>
+ <%= link_to budget_investments_path(budget_id: current_budget.id, filter: 'unfeasible') do %>
+ <%= t("budgets.index.unfeasible_investment_proyects") %>
+ <% end %>
+ <% if show_links %>
+ <%= link_to budget_investments_path(budget_id: current_budget.id, filter: 'unselected') do %>
+ <%= t("budgets.index.not_selected_investment_proyects") %>
+ <% end %>
+ <% end %>
+
+ <%= t("budgets.index.section_footer.title") %> +
+<%= t("budgets.index.section_footer.description") %>
+<%= t("budgets.index.section_footer.help_text_1") %>
+<%= t("budgets.index.section_footer.help_text_2") %>
+<%= t("budgets.index.section_footer.help_text_3", + org: link_to(setting['org_name'], new_user_registration_path)).html_safe %>
+<%= t("budgets.index.section_footer.help_text_4") %>
- <%= t("budgets.index.section_footer.title") %> -
-<%= t("budgets.index.section_footer.description") %>
-<%= t("budgets.index.section_footer.help_text_1") %>
-<%= t("budgets.index.section_footer.help_text_2") %>
-<%= t("budgets.index.section_footer.help_text_3", - org: link_to(setting['org_name'], new_user_registration_path)).html_safe %>
-<%= t("budgets.index.section_footer.help_text_4") %>
-