diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index 91837158a..74675f1c3 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -40,6 +40,7 @@ @import "debates/**/*"; @import "layout/**/*"; @import "machine_learning/**/*"; +@import "moderation/**/*"; @import "proposals/**/*"; @import "relationable/**/*"; @import "sdg/**/*"; diff --git a/app/assets/stylesheets/moderation/users/index.scss b/app/assets/stylesheets/moderation/users/index.scss new file mode 100644 index 000000000..aab07125c --- /dev/null +++ b/app/assets/stylesheets/moderation/users/index.scss @@ -0,0 +1,10 @@ +.moderation-users-index { + th:last-child, + td:last-child { + text-align: $global-right; + } + + .table-actions { + justify-content: flex-end; + } +} diff --git a/app/views/moderation/users/index.html.erb b/app/views/moderation/users/index.html.erb index 87b5b2dd5..e1492c7bb 100644 --- a/app/views/moderation/users/index.html.erb +++ b/app/views/moderation/users/index.html.erb @@ -1,35 +1,41 @@ -

<%= t("moderation.users.index.title") %>

+
+

<%= t("moderation.users.index.title") %>

-<%= render Admin::SearchComponent.new(label: t("moderation.users.index.search_placeholder")) %> + <%= render Admin::SearchComponent.new(label: t("moderation.users.index.search_placeholder")) %> -<% if @users.present? %> -

<%= page_entries_info @users %>

-<% end %> + <% if @users.present? %> +

<%= page_entries_info @users %>

- - - <% @users.each do |user| %> - - - - - <% end %> - -
- <%= user.name %> - - <% if user.hidden? %> - <%= t("moderation.users.index.hidden") %> - <% else %> - <%= render Admin::ActionComponent.new( - :hide_in_moderation_screen, - user, - text: t("moderation.users.index.hide"), - method: :put, - "aria-label": true, - class: "button hollow alert" - ) %> - <% end %> -
+ + + + + + + <% @users.each do |user| %> + + + + + <% end %> + +
<%= t("admin.hidden_users.index.user") %><%= t("admin.actions.actions") %>
+ <%= user.name %> + + <% if user.hidden? %> + <%= t("moderation.users.index.hidden") %> + <% else %> + <%= render Admin::TableActionsComponent.new(user, actions: []) do |actions| %> + <%= actions.action( + :hide_in_moderation_screen, + text: t("moderation.users.index.hide"), + method: :put, + class: "button hollow alert" + ) %> + <% end %> + <% end %> +
-<%= paginate @users %> + <%= paginate @users %> + <% end %> +