Using order links in this case causes an unusual interface, where we show filter links, then information about the number of results, and then order links. Whether or not this makes sense needs to be confirmed with usability tests. In any case, this is still way better than using `<select>` fields which automatically change to a new page, since they cause problems to keyboard users, are harder to select for touchscreen users, might confuse screen reader users who will notice a form but no way to submit it, and are not elements we generally use to let users choose the order of the records. For a more detailed explanation of these issues, check the commit message in the commit "Use order links to sort comments and topics" (just a few commits ago).
40 lines
1.4 KiB
Plaintext
40 lines
1.4 KiB
Plaintext
<h2><%= t("moderation.#{i18n_namespace}.index.title") %></h2>
|
|
|
|
<%= 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 %>
|
|
<p class="float-left js-check">
|
|
<%= t("shared.check") %>:
|
|
<%= link_to t("shared.check_all"), "#", data: { check_all: field_name } %>
|
|
|
|
|
<%= link_to t("shared.check_none"), "#", data: { check_none: field_name } %>
|
|
</p>
|
|
|
|
<%= content %>
|
|
|
|
<%= submit_tag t("moderation.#{i18n_namespace}.index.block_authors"),
|
|
name: "block_authors",
|
|
class: "button hollow alert",
|
|
data: { confirm: t("moderation.#{i18n_namespace}.index.confirm") } %>
|
|
|
|
<div class="float-right">
|
|
<%= submit_tag t("moderation.#{i18n_namespace}.index.hide"),
|
|
name: "hide_#{table_name}",
|
|
class: "button hollow alert",
|
|
data: { confirm: t("moderation.#{i18n_namespace}.index.confirm") } %>
|
|
|
|
<%= submit_tag t("moderation.#{i18n_namespace}.index.ignore_flags"),
|
|
name: "ignore_flags",
|
|
class: "button hollow",
|
|
data: { confirm: t("moderation.#{i18n_namespace}.index.confirm") } %>
|
|
</div>
|
|
|
|
<%= paginate records %>
|
|
<% end %>
|