Files
nairobi/app/components/moderation/shared/index_component.html.erb
Javi Martín 673eb1358a Group buttons to check all/none elements
Since they're related, we're making them part of the same list. Instead
of finding a way to have the `Select` prefix they had as a label for the
list, we're including the "prefix" they had inside their texts, so the
text of a button doesn't need any additional context.
2024-06-06 16:28:19 +02:00

38 lines
1.5 KiB
Plaintext

<%= header %>
<%= render "shared/filter_subnav", i18n_namespace: "moderation.#{i18n_namespace}.index" %>
<h3 class="inline-block"><%= page_entries_info records %></h3>
<% if records.any? %>
<%= render "shared/order_links", i18n_namespace: "moderation.#{i18n_namespace}.index" %>
<% end %>
<%= form_tag form_path, method: :put do %>
<ul class="check-all-none">
<li><%= button_tag t("shared.check_all"), type: "button", data: { check_all: field_name } %></li>
<li><%= button_tag t("shared.check_none"), type: "button", data: { check_none: field_name } %></li>
</ul>
<%= content %>
<%= submit_tag t("moderation.#{i18n_namespace}.index.block_authors"),
name: "block_authors",
class: "button hollow alert",
data: { confirm: t("moderation.actions.confirm_action", action: t("moderation.#{i18n_namespace}.index.block_authors")) } %>
<div class="float-right">
<%= submit_tag t("moderation.#{i18n_namespace}.index.hide"),
name: "hide_#{table_name}",
class: "button hollow alert",
data: { confirm: t("moderation.actions.confirm_action", action: t("moderation.#{i18n_namespace}.index.hide")) } %>
<%= submit_tag t("moderation.#{i18n_namespace}.index.ignore_flags"),
name: "ignore_flags",
class: "button hollow",
data: { confirm: t("moderation.actions.confirm_action", action: t("moderation.#{i18n_namespace}.index.ignore_flags")) } %>
</div>
<%= paginate records %>
<% end %>