Allow additional links in table actions component

This way we'll be able to make these links consistent.
This commit is contained in:
Javi Martín
2020-06-12 19:23:25 +02:00
parent e3753b1ad9
commit fb23df2e5b
20 changed files with 131 additions and 116 deletions

View File

@@ -35,17 +35,17 @@
<td><%= I18n.l page.created_at, format: :short %></td>
<td><%= t("admin.site_customization.pages.page.status_#{page.status}") %></td>
<td>
<% if page.status == "published" %>
<%= link_to t("admin.site_customization.pages.index.see_page"),
page.url,
target: "_blank",
class: "button hollow" %>
<% end %>
<%= render Admin::TableActionsComponent.new(page,
actions: [:destroy],
destroy_text: t("admin.site_customization.pages.index.delete")
) %>
) do |actions| %>
<% if page.status == "published" %>
<%= actions.link_to t("admin.site_customization.pages.index.see_page"),
page.url,
target: "_blank",
class: "button hollow" %>
<% end %>
<% end %>
</td>
</tr>
<% end %>