Use the actions component to render phase actions

We forgot to include this table when refactoring in commit 738646a56.
This commit is contained in:
Javi Martín
2020-11-03 14:14:46 +01:00
parent 9794ffbbf8
commit a1cae895ba
2 changed files with 8 additions and 3 deletions

View File

@@ -76,9 +76,10 @@
<span class="budget-phase-enabled <%= phase.enabled? ? "enabled" : "disabled" %>"></span>
</td>
<td>
<%= link_to t("admin.budgets.edit.edit_phase"),
edit_admin_budget_budget_phase_path(@budget, phase),
class: "button hollow expanded" %>
<%= render Admin::TableActionsComponent.new(phase,
actions: [:edit],
edit_text: t("admin.budgets.edit.edit_phase")
) %>
</td>
</tr>
<% end %>

View File

@@ -274,6 +274,10 @@ resolve "Budget::Heading" do |heading, options|
[heading.budget, :group, :heading, options.merge(group_id: heading.group, id: heading)]
end
resolve "Budget::Phase" do |phase, options|
[phase.budget, :phase, options.merge(id: phase)]
end
resolve "Poll::Booth" do |booth, options|
[:booth, options.merge(id: booth)]
end