Files
grecia/app/components/debates/mark_featured_action_component.html.erb
Javi Martín f8faabf7d1 Extract component to mark a debate as featured
We're also moving the path argument in the `link_to` calls to a
different line, since it's what we usually do.
2024-11-08 13:24:05 +01:00

17 lines
735 B
Plaintext

 | 
<% if debate.featured? %>
<%= link_to t("admin.actions.unmark_featured").capitalize,
unmark_featured_debate_path(debate),
method: :put,
data: { confirm: t("admin.actions.confirm_action",
action: t("admin.actions.unmark_featured"),
name: debate.title) } %>
<% else %>
<%= link_to t("admin.actions.mark_featured").capitalize,
mark_featured_debate_path(debate),
method: :put,
data: { confirm: t("admin.actions.confirm_action",
action: t("admin.actions.mark_featured"),
name: debate.title) } %>
<% end %>