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.
This commit is contained in:
Javi Martín
2021-03-09 19:33:38 +01:00
parent 4896c754a0
commit 65ecae2c45

View File

@@ -3,47 +3,19 @@
<% end %>
<div class="budget-header">
<div class="row" data-equalizer data-equalizer-on="medium">
<div class="small-12 medium-9 column" data-equalizer-watch>
<div class="row">
<div class="small-12 column">
<%= back_link_to budgets_path %>
<h1><%= @budget.name %></h1>
<%= auto_link_already_sanitized_html wysiwyg(@budget.description) %>
</div>
<div class="small-12 medium-3 column info" data-equalizer-watch>
<p>
<strong><%= t("budgets.show.phase") %></strong>
</p>
<h2><%= @budget.current_phase.name %></h2>
<% 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 %>
<div class="callout warning margin-top">
<%= sanitize(t("budgets.investments.index.sidebar.verified_only",
verify: link_to_verify_account)) %>
</div>
<% end %>
<% else %>
<div class="callout primary margin-top">
<%= sanitize(t("budgets.investments.index.sidebar.not_logged_in",
sign_in: link_to_signin, sign_up: link_to_signup)) %>
</div>
<% end %>
<% end %>
<% if can?(:read_results, @budget) %>
<%= link_to t("budgets.show.see_results"),
budget_results_path(@budget),
class: "button margin-top expanded" %>
<% end %>
</div>
</div>
</div>
<%= render Budgets::SubheaderComponent.new(@budget) %>
<div class="row margin">
<div class="small-12 medium-9 column">
<% if @current_filter == "unfeasible" %>