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> <span class="budget-phase-enabled <%= phase.enabled? ? "enabled" : "disabled" %>"></span>
</td> </td>
<td> <td>
<%= link_to t("admin.budgets.edit.edit_phase"), <%= render Admin::TableActionsComponent.new(phase,
edit_admin_budget_budget_phase_path(@budget, phase), actions: [:edit],
class: "button hollow expanded" %> edit_text: t("admin.budgets.edit.edit_phase")
) %>
</td> </td>
</tr> </tr>
<% end %> <% 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)] [heading.budget, :group, :heading, options.merge(group_id: heading.group, id: heading)]
end end
resolve "Budget::Phase" do |phase, options|
[phase.budget, :phase, options.merge(id: phase)]
end
resolve "Poll::Booth" do |booth, options| resolve "Poll::Booth" do |booth, options|
[:booth, options.merge(id: booth)] [:booth, options.merge(id: booth)]
end end