Extract method to get a budget phase title

This commit is contained in:
Javi Martín
2021-03-05 18:49:12 +01:00
parent 70cf956210
commit 014d29b991
12 changed files with 16 additions and 16 deletions

View File

@@ -2,7 +2,7 @@
<div class="row">
<div class="small-12 column">
<h2><%= t("admin.budgets.edit.title") %> - <%= t("budgets.phase.#{@phase.kind}") %></h2>
<h2><%= t("admin.budgets.edit.title") %> - <%= @phase.name %></h2>
</div>
</div>

View File

@@ -59,7 +59,7 @@
<% @budget.phases.order(:id).each do |phase| %>
<tr id="<%= dom_id(phase) %>" class="phase">
<td>
<%= t("budgets.phase.#{phase.kind}") %>
<%= phase.name %>
<% if phase.current? %>
<span class="label success"><strong><%= t("admin.budgets.edit.active") %></strong></span>
<% end %>

View File

@@ -29,7 +29,7 @@
<strong><%= budget.name %></strong>
</td>
<td class="small">
<%= t("budgets.phase.#{budget.phase}") %>
<%= budget.current_phase.name %>
</td>
<td>
<%= render Admin::Budgets::TableActionsComponent.new(budget) %>