From 65ecae2c450b1ff354808f90853595d3f4af6a06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Tue, 9 Mar 2021 19:33:38 +0100 Subject: [PATCH] Use same subheader on budget show view There was duplication between the index and the show views, and when we changed the design of the phases in the index we forgot to change the subheader in the other page as well. --- app/views/budgets/show.html.erb | 36 ++++----------------------------- 1 file changed, 4 insertions(+), 32 deletions(-) diff --git a/app/views/budgets/show.html.erb b/app/views/budgets/show.html.erb index f9971c9e0..f7e6617e0 100644 --- a/app/views/budgets/show.html.erb +++ b/app/views/budgets/show.html.erb @@ -3,47 +3,19 @@ <% end %>
-
-
+
+
<%= back_link_to budgets_path %>

<%= @budget.name %>

<%= auto_link_already_sanitized_html wysiwyg(@budget.description) %>
-
-

- <%= t("budgets.show.phase") %> -

-

<%= @budget.current_phase.name %>

- - <% if @budget.accepting? %> - <% if current_user %> - <% if current_user.level_two_or_three_verified? %> - <%= link_to t("budgets.investments.index.sidebar.create"), new_budget_investment_path(@budget), class: "button margin-top expanded" %> - <% else %> -
- <%= sanitize(t("budgets.investments.index.sidebar.verified_only", - verify: link_to_verify_account)) %> -
- <% end %> - <% else %> -
- <%= sanitize(t("budgets.investments.index.sidebar.not_logged_in", - sign_in: link_to_signin, sign_up: link_to_signup)) %> -
- <% end %> - <% end %> - - <% if can?(:read_results, @budget) %> - <%= link_to t("budgets.show.see_results"), - budget_results_path(@budget), - class: "button margin-top expanded" %> - <% end %> -
+<%= render Budgets::SubheaderComponent.new(@budget) %> +
<% if @current_filter == "unfeasible" %>