Allow additional links in table actions component
This way we'll be able to make these links consistent.
This commit is contained in:
@@ -1,3 +1,5 @@
|
|||||||
|
<%= content %>
|
||||||
|
|
||||||
<% if actions.include?(:edit) %>
|
<% if actions.include?(:edit) %>
|
||||||
<%= link_to edit_text, edit_path, edit_options %>
|
<%= link_to edit_text, edit_path, edit_options %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|||||||
@@ -30,14 +30,17 @@
|
|||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<% if admin_notification.draft? %>
|
<% if admin_notification.draft? %>
|
||||||
<%= render Admin::TableActionsComponent.new(admin_notification) %>
|
<%= render Admin::TableActionsComponent.new(admin_notification) do |actions| %>
|
||||||
<%= link_to t("admin.admin_notifications.index.preview"),
|
<%= actions.link_to t("admin.admin_notifications.index.preview"),
|
||||||
admin_admin_notification_path(admin_notification),
|
admin_admin_notification_path(admin_notification),
|
||||||
class: "button" %>
|
class: "button" %>
|
||||||
|
<% end %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= link_to t("admin.admin_notifications.index.view"),
|
<%= render Admin::TableActionsComponent.new(actions: []) do |actions| %>
|
||||||
admin_admin_notification_path(admin_notification),
|
<%= actions.link_to t("admin.admin_notifications.index.view"),
|
||||||
class: "button" %>
|
admin_admin_notification_path(admin_notification),
|
||||||
|
class: "button" %>
|
||||||
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -34,9 +34,11 @@
|
|||||||
<%= audit.user&.name %>
|
<%= audit.user&.name %>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<%= link_to t("shared.show"),
|
<%= render Admin::TableActionsComponent.new(actions: []) do |actions| %>
|
||||||
admin_polymorphic_path(audit),
|
<%= actions.link_to t("shared.show"),
|
||||||
class: "button hollow primary" %>
|
admin_polymorphic_path(audit),
|
||||||
|
class: "button hollow primary" %>
|
||||||
|
<% end %>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|||||||
@@ -16,7 +16,6 @@
|
|||||||
<th><%= t("admin.budget_groups.name") %></th>
|
<th><%= t("admin.budget_groups.name") %></th>
|
||||||
<th><%= Budget::Group.human_attribute_name(:max_votable_headings) %></th>
|
<th><%= Budget::Group.human_attribute_name(:max_votable_headings) %></th>
|
||||||
<th><%= t("admin.budget_groups.headings_name") %></th>
|
<th><%= t("admin.budget_groups.headings_name") %></th>
|
||||||
<th><%= t("admin.budget_groups.headings_edit") %></th>
|
|
||||||
<th><%= t("admin.actions.actions") %></th>
|
<th><%= t("admin.actions.actions") %></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
@@ -26,10 +25,11 @@
|
|||||||
<td><%= link_to group.name, edit_admin_budget_group_path(@budget, group) %></td>
|
<td><%= link_to group.name, edit_admin_budget_group_path(@budget, group) %></td>
|
||||||
<td><%= group.max_votable_headings %></td>
|
<td><%= group.max_votable_headings %></td>
|
||||||
<td><%= group.headings.count %></td>
|
<td><%= group.headings.count %></td>
|
||||||
<td><%= link_to t("admin.budget_groups.headings_manage"),
|
|
||||||
admin_budget_group_headings_path(@budget, group) %></td>
|
|
||||||
<td>
|
<td>
|
||||||
<%= render Admin::TableActionsComponent.new(group) %>
|
<%= render Admin::TableActionsComponent.new(group) do |actions| %>
|
||||||
|
<%= actions.link_to t("admin.budget_groups.headings_manage"),
|
||||||
|
admin_budget_group_headings_path(@budget, group) %>
|
||||||
|
<% end %>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|||||||
@@ -14,10 +14,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<th><%= t("admin.budgets.index.table_name") %></th>
|
<th><%= t("admin.budgets.index.table_name") %></th>
|
||||||
<th><%= t("admin.budgets.index.table_phase") %></th>
|
<th><%= t("admin.budgets.index.table_phase") %></th>
|
||||||
<th><%= t("admin.budgets.index.table_investments") %></th>
|
<th><%= t("admin.actions.actions") %></th>
|
||||||
<th><%= t("admin.budgets.index.table_edit_groups") %></th>
|
|
||||||
<th><%= t("admin.budgets.index.table_edit_budget") %></th>
|
|
||||||
<th><%= t("admin.budgets.index.table_admin_ballots") %></th>
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@@ -30,21 +27,16 @@
|
|||||||
<%= t("budgets.phase.#{budget.phase}") %>
|
<%= t("budgets.phase.#{budget.phase}") %>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<%= link_to t("admin.budgets.index.budget_investments"),
|
<%= render Admin::TableActionsComponent.new(budget, actions: [:edit], edit_text: t("admin.budgets.index.edit_budget")) do |actions| %>
|
||||||
admin_budget_budget_investments_path(budget_id: budget.id),
|
<%= actions.link_to t("admin.budgets.index.budget_investments"),
|
||||||
class: "button hollow medium" %>
|
admin_budget_budget_investments_path(budget_id: budget.id),
|
||||||
</td>
|
class: "button hollow medium" %>
|
||||||
<td class="small">
|
<%= actions.link_to t("admin.budgets.index.edit_groups"), admin_budget_groups_path(budget) %>
|
||||||
<%= link_to t("admin.budgets.index.edit_groups"), admin_budget_groups_path(budget) %>
|
<% if budget.poll.present? %>
|
||||||
</td>
|
<%= actions.link_to t("admin.budgets.index.admin_ballots"), admin_poll_booth_assignments_path(budget.poll) %>
|
||||||
<td class="small">
|
<% else %>
|
||||||
<%= link_to t("admin.budgets.index.edit_budget"), edit_admin_budget_path(budget) %>
|
<%= link_to_create_budget_poll(budget) %>
|
||||||
</td>
|
<% end %>
|
||||||
<td class="small">
|
|
||||||
<% if budget.poll.present? %>
|
|
||||||
<%= link_to t("admin.budgets.index.admin_ballots"), admin_poll_booth_assignments_path(budget.poll) %>
|
|
||||||
<% else %>
|
|
||||||
<%= link_to_create_budget_poll(budget) %>
|
|
||||||
<% end %>
|
<% end %>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -29,10 +29,11 @@
|
|||||||
<% end %>
|
<% end %>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<%= render Admin::TableActionsComponent.new(newsletter) %>
|
<%= render Admin::TableActionsComponent.new(newsletter) do |actions| %>
|
||||||
|
<%= actions.link_to t("admin.newsletters.index.preview"),
|
||||||
<%= link_to t("admin.newsletters.index.preview"), admin_newsletter_path(newsletter),
|
admin_newsletter_path(newsletter),
|
||||||
class: "button" %>
|
class: "button" %>
|
||||||
|
<% end %>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|||||||
@@ -25,11 +25,15 @@
|
|||||||
<span class="disabled"><%= t("admin.booth_assignments.manage.status.unassigned") %></span>
|
<span class="disabled"><%= t("admin.booth_assignments.manage.status.unassigned") %></span>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<%= link_to t("admin.booth_assignments.manage.actions.assign"),
|
<% unless @poll.expired? %>
|
||||||
admin_poll_booth_assignments_path(@poll, booth_id: booth.id),
|
<%= render Admin::TableActionsComponent.new(actions: []) do |actions| %>
|
||||||
method: :post,
|
<%= actions.link_to t("admin.booth_assignments.manage.actions.assign"),
|
||||||
remote: true,
|
admin_poll_booth_assignments_path(@poll, booth_id: booth.id),
|
||||||
title: t("admin.booth_assignments.manage.actions.assign"),
|
method: :post,
|
||||||
class: "button hollow expanded" if !@poll.expired? %>
|
remote: true,
|
||||||
|
title: t("admin.booth_assignments.manage.actions.assign"),
|
||||||
|
class: "button hollow expanded" %>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
</td>
|
</td>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|||||||
@@ -7,9 +7,11 @@
|
|||||||
</td>
|
</td>
|
||||||
<td class="text-right">
|
<td class="text-right">
|
||||||
<% if controller_name == "shifts" || controller_name == "booths" && action_name == "available" %>
|
<% if controller_name == "shifts" || controller_name == "booths" && action_name == "available" %>
|
||||||
<%= link_to t("admin.booths.booth.shifts"),
|
<%= render Admin::TableActionsComponent.new(actions: []) do |actions| %>
|
||||||
new_admin_booth_shift_path(booth),
|
<%= actions.link_to t("admin.booths.booth.shifts"),
|
||||||
class: "button hollow" %>
|
new_admin_booth_shift_path(booth),
|
||||||
|
class: "button hollow" %>
|
||||||
|
<% end %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= render Admin::TableActionsComponent.new(booth,
|
<%= render Admin::TableActionsComponent.new(booth,
|
||||||
actions: [:edit],
|
actions: [:edit],
|
||||||
|
|||||||
@@ -21,9 +21,11 @@
|
|||||||
destroy_text: t("admin.poll_officers.officer.delete")
|
destroy_text: t("admin.poll_officers.officer.delete")
|
||||||
) %>
|
) %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= link_to t("admin.poll_officers.officer.add"), { controller: "admin/poll/officers", action: :create, user_id: officer.user_id },
|
<%= render Admin::TableActionsComponent.new(actions: []) do |actions| %>
|
||||||
method: :post,
|
<%= actions.link_to t("admin.poll_officers.officer.add"), { controller: "admin/poll/officers", action: :create, user_id: officer.user_id },
|
||||||
class: "button success expanded" %>
|
method: :post,
|
||||||
|
class: "button success expanded" %>
|
||||||
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -35,11 +35,13 @@
|
|||||||
destroy_text: t("admin.poll_officers.officer.delete")
|
destroy_text: t("admin.poll_officers.officer.delete")
|
||||||
) %>
|
) %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= link_to t("admin.poll_officers.officer.add"),
|
<%= render Admin::TableActionsComponent.new(actions: []) do |actions| %>
|
||||||
{ controller: "admin/poll/officers", action: :create,
|
<%= actions.link_to t("admin.poll_officers.officer.add"),
|
||||||
user_id: officer.user_id },
|
{ controller: "admin/poll/officers", action: :create,
|
||||||
method: :post,
|
user_id: officer.user_id },
|
||||||
class: "button success expanded" %>
|
method: :post,
|
||||||
|
class: "button success expanded" %>
|
||||||
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -13,9 +13,10 @@
|
|||||||
<td>
|
<td>
|
||||||
<%= render Admin::TableActionsComponent.new(poll,
|
<%= render Admin::TableActionsComponent.new(poll,
|
||||||
destroy_confirmation: t("admin.polls.destroy.alert")
|
destroy_confirmation: t("admin.polls.destroy.alert")
|
||||||
) %>
|
) do |actions| %>
|
||||||
<%= link_to t("admin.actions.configure"),
|
<%= actions.link_to t("admin.actions.configure"),
|
||||||
admin_poll_path(poll),
|
admin_poll_path(poll),
|
||||||
class: "button hollow " %>
|
class: "button hollow " %>
|
||||||
|
<% end %>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -30,9 +30,10 @@
|
|||||||
<% end %>
|
<% end %>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<%= link_to t("admin.polls.show.edit_answers"), admin_question_path(question),
|
<%= render Admin::TableActionsComponent.new(question) do |actions| %>
|
||||||
class: "button hollow" %>
|
<%= actions.link_to t("admin.polls.show.edit_answers"), admin_question_path(question),
|
||||||
<%= render Admin::TableActionsComponent.new(question) %>
|
class: "button hollow" %>
|
||||||
|
<% end %>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<thead>
|
<thead>
|
||||||
<th class="medium-6"><%= t("admin.polls.index.name") %></th>
|
<th class="medium-6"><%= t("admin.polls.index.name") %></th>
|
||||||
<th><%= t("admin.polls.index.dates") %></th>
|
<th><%= t("admin.polls.index.dates") %></th>
|
||||||
<th class="text-right"><%= t("admin.actions.actions") %></th>
|
<th><%= t("admin.actions.actions") %></th>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<% @polls.each do |poll| %>
|
<% @polls.each do |poll| %>
|
||||||
@@ -16,10 +16,12 @@
|
|||||||
<td>
|
<td>
|
||||||
<%= l poll.starts_at.to_date %> - <%= l poll.ends_at.to_date %>
|
<%= l poll.starts_at.to_date %> - <%= l poll.ends_at.to_date %>
|
||||||
</td>
|
</td>
|
||||||
<td class="text-right">
|
<td>
|
||||||
<%= link_to t("admin.booth_assignments.manage_assignments"),
|
<%= render Admin::TableActionsComponent.new(actions: []) do |actions| %>
|
||||||
manage_admin_poll_booth_assignments_path(poll),
|
<%= actions.link_to t("admin.booth_assignments.manage_assignments"),
|
||||||
class: "button hollow" %>
|
manage_admin_poll_booth_assignments_path(poll),
|
||||||
|
class: "button hollow" %>
|
||||||
|
<% end %>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|||||||
@@ -15,9 +15,11 @@
|
|||||||
</p>
|
</p>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<%= link_to t("admin.questions.index.create_question"),
|
<%= render Admin::TableActionsComponent.new(actions: []) do |actions| %>
|
||||||
new_admin_question_path(proposal_id: proposal.id),
|
<%= actions.link_to t("admin.questions.index.create_question"),
|
||||||
class: "button hollow" %>
|
new_admin_question_path(proposal_id: proposal.id),
|
||||||
|
class: "button hollow" %>
|
||||||
|
<% end %>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|||||||
@@ -36,16 +36,17 @@
|
|||||||
<%= link_to document.title, document.attachment.url %>
|
<%= link_to document.title, document.attachment.url %>
|
||||||
</td>
|
</td>
|
||||||
<td class="text-right">
|
<td class="text-right">
|
||||||
<%= link_to t("documents.buttons.download_document"),
|
|
||||||
document.attachment.url,
|
|
||||||
target: "_blank",
|
|
||||||
rel: "nofollow",
|
|
||||||
class: "button hollow" %>
|
|
||||||
|
|
||||||
<%= render Admin::TableActionsComponent.new(document,
|
<%= render Admin::TableActionsComponent.new(document,
|
||||||
actions: [:destroy],
|
actions: [:destroy],
|
||||||
destroy_path: document_path(document)
|
destroy_path: document_path(document)
|
||||||
) %>
|
) do |actions| %>
|
||||||
|
<%= actions.link_to t("documents.buttons.download_document"),
|
||||||
|
document.attachment.url,
|
||||||
|
target: "_blank",
|
||||||
|
rel: "nofollow",
|
||||||
|
class: "button hollow" %>
|
||||||
|
|
||||||
|
<% end %>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|||||||
@@ -35,17 +35,17 @@
|
|||||||
<td><%= I18n.l page.created_at, format: :short %></td>
|
<td><%= I18n.l page.created_at, format: :short %></td>
|
||||||
<td><%= t("admin.site_customization.pages.page.status_#{page.status}") %></td>
|
<td><%= t("admin.site_customization.pages.page.status_#{page.status}") %></td>
|
||||||
<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,
|
<%= render Admin::TableActionsComponent.new(page,
|
||||||
actions: [:destroy],
|
actions: [:destroy],
|
||||||
destroy_text: t("admin.site_customization.pages.index.delete")
|
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>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|||||||
@@ -18,32 +18,29 @@
|
|||||||
<%= t("admin.system_emails.#{system_email_title}.description") %>
|
<%= t("admin.system_emails.#{system_email_title}.description") %>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<% if system_email_actions.include?("view") %>
|
<%= render Admin::TableActionsComponent.new(actions: []) do |actions| %>
|
||||||
<div class="small-4 column">
|
<% if system_email_actions.include?("view") %>
|
||||||
<%= link_to t("admin.shared.view"), admin_system_email_view_path(system_email_title),
|
<%= actions.link_to t("admin.shared.view"),
|
||||||
class: "button hollow expanded" %>
|
admin_system_email_view_path(system_email_title),
|
||||||
</div>
|
class: "button hollow" %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if system_email_actions.include?("preview_pending") %>
|
|
||||||
<div class="small-4 column">
|
<% if system_email_actions.include?("preview_pending") %>
|
||||||
<%= link_to t("admin.system_emails.preview_pending.action"),
|
<%= actions.link_to t("admin.system_emails.preview_pending.action"),
|
||||||
admin_system_email_preview_pending_path(system_email_title),
|
admin_system_email_preview_pending_path(system_email_title),
|
||||||
class: "button expanded" %>
|
class: "button" %>
|
||||||
</div>
|
<%= actions.link_to t("admin.system_emails.preview_pending.send_pending"),
|
||||||
<div class="small-4 column">
|
admin_system_email_send_pending_path(system_email_title),
|
||||||
<%= link_to t("admin.system_emails.preview_pending.send_pending"),
|
class: "button success",
|
||||||
admin_system_email_send_pending_path(system_email_title),
|
method: :put %>
|
||||||
class: "button success expanded",
|
<% end %>
|
||||||
method: :put %>
|
|
||||||
</div>
|
<% if system_email_actions.include?("edit_info") %>
|
||||||
<% end %>
|
|
||||||
<% if system_email_actions.include?("edit_info") %>
|
|
||||||
<div class="small-8 column">
|
|
||||||
<p class="help-text">
|
<p class="help-text">
|
||||||
<%= t("admin.system_emails.edit_info") %><br>
|
<%= t("admin.system_emails.edit_info") %><br>
|
||||||
<code><%= "app/views/mailer/#{system_email_title}.html.erb" %></code>
|
<code><%= "app/views/mailer/#{system_email_title}.html.erb" %></code>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -72,10 +72,6 @@ en:
|
|||||||
budget_investments: Manage projects
|
budget_investments: Manage projects
|
||||||
table_name: Name
|
table_name: Name
|
||||||
table_phase: Phase
|
table_phase: Phase
|
||||||
table_investments: Investments
|
|
||||||
table_edit_groups: Headings groups
|
|
||||||
table_edit_budget: Edit
|
|
||||||
table_admin_ballots: Ballots
|
|
||||||
edit_groups: Edit headings groups
|
edit_groups: Edit headings groups
|
||||||
edit_budget: Edit budget
|
edit_budget: Edit budget
|
||||||
admin_ballots: Admin ballots
|
admin_ballots: Admin ballots
|
||||||
@@ -117,7 +113,6 @@ en:
|
|||||||
budget_groups:
|
budget_groups:
|
||||||
name: "Name"
|
name: "Name"
|
||||||
headings_name: "Headings"
|
headings_name: "Headings"
|
||||||
headings_edit: "Edit Headings"
|
|
||||||
headings_manage: "Manage headings"
|
headings_manage: "Manage headings"
|
||||||
no_groups: "There are no groups."
|
no_groups: "There are no groups."
|
||||||
amount:
|
amount:
|
||||||
|
|||||||
@@ -72,10 +72,6 @@ es:
|
|||||||
budget_investments: Gestionar proyectos de gasto
|
budget_investments: Gestionar proyectos de gasto
|
||||||
table_name: Nombre
|
table_name: Nombre
|
||||||
table_phase: Fase
|
table_phase: Fase
|
||||||
table_investments: Proyectos de gasto
|
|
||||||
table_edit_groups: Grupos de partidas
|
|
||||||
table_edit_budget: Editar
|
|
||||||
table_admin_ballots: Urnas
|
|
||||||
edit_groups: Editar grupos de partidas
|
edit_groups: Editar grupos de partidas
|
||||||
edit_budget: Editar presupuesto
|
edit_budget: Editar presupuesto
|
||||||
admin_ballots: Gestionar urnas
|
admin_ballots: Gestionar urnas
|
||||||
@@ -117,7 +113,6 @@ es:
|
|||||||
budget_groups:
|
budget_groups:
|
||||||
name: "Nombre"
|
name: "Nombre"
|
||||||
headings_name: "Partidas"
|
headings_name: "Partidas"
|
||||||
headings_edit: "Editar Partidas"
|
|
||||||
headings_manage: "Gestionar partidas"
|
headings_manage: "Gestionar partidas"
|
||||||
no_groups: "No hay grupos."
|
no_groups: "No hay grupos."
|
||||||
amount:
|
amount:
|
||||||
|
|||||||
@@ -54,4 +54,15 @@ describe Admin::TableActionsComponent, type: :component do
|
|||||||
|
|
||||||
expect(page).to have_css "a#edit_me"
|
expect(page).to have_css "a#edit_me"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it "allows custom content" do
|
||||||
|
render_inline Admin::TableActionsComponent.new(record) do
|
||||||
|
"<a href='/'>Main</a>".html_safe
|
||||||
|
end
|
||||||
|
|
||||||
|
expect(page).to have_css "a", count: 3
|
||||||
|
expect(page).to have_link "Main", href: "/"
|
||||||
|
expect(page).to have_link "Edit"
|
||||||
|
expect(page).to have_link "Delete"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user