Files
nairobi/app/components/admin/hidden_table_actions_component.html.erb
Javi Martín eb3f2bc2ca Extract component for restore and hide actions
By doing so, we remove a lot of duplication.
2020-10-21 13:19:52 +02:00

13 lines
372 B
Plaintext

<%= render Admin::TableActionsComponent.new(actions: []) do %>
<%= link_to restore_text, restore_path,
method: :put,
data: { confirm: t("admin.actions.confirm") },
class: "button hollow warning" %>
<% unless record.confirmed_hide? %>
<%= link_to confirm_hide_text, confirm_hide_path,
method: :put,
class: "button" %>
<% end %>
<% end %>