Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement bulk actions for global moderations #13678

Merged
merged 55 commits into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
c81157c
add action button and checkbox to index
ElviaBth Nov 19, 2024
69c2d97
add actions list
ElviaBth Nov 19, 2024
a44b158
add JS file
ElviaBth Nov 20, 2024
3cd5c1e
add bulk-actions files
ElviaBth Nov 20, 2024
a55cc35
Merge branch 'develop' into feature/implement_bulk_actions_moderations
ElviaBth Nov 20, 2024
b85b88e
add bulk_action method to controller
ElviaBth Nov 21, 2024
1ba30b4
add moderated users bulk actions
ElviaBth Nov 21, 2024
d207c3e
add moderated_users JS file
ElviaBth Nov 21, 2024
4e98231
add bulk_actions command and routes
ElviaBth Nov 21, 2024
00b1235
refactor ko
ElviaBth Nov 22, 2024
8f2eae9
refactor bulk action method on command
ElviaBth Nov 22, 2024
9747beb
add conditions for dropdown
ElviaBth Nov 24, 2024
820a0f1
refactor index view
ElviaBth Nov 25, 2024
3b1ab30
fix specs error
ElviaBth Nov 25, 2024
884dcbd
fix iniciatives spec
ElviaBth Nov 26, 2024
12da3ef
add more checks to admin_manages_global_moderations spec
ElviaBth Nov 26, 2024
e54ac18
add bulk_action to moderated_users controller
ElviaBth Nov 26, 2024
009fc3b
hide and show dropdown actions
ElviaBth Nov 27, 2024
ce0e015
add bulk_unreported
ElviaBth Nov 27, 2024
84cc468
add bulk_new, bulk_create and bulk_destroy
ElviaBth Nov 27, 2024
b8d919b
fix spec error
ElviaBth Nov 28, 2024
f91c4fc
fix user_id bug
ElviaBth Nov 28, 2024
647467e
add bulk_unblock command
ElviaBth Nov 28, 2024
3f8f732
refactor bulk_block command
ElviaBth Nov 28, 2024
45b3c38
refactor bulk_unblock
ElviaBth Nov 29, 2024
413784d
refactor bulk_unreport_user
ElviaBth Nov 29, 2024
657e4a1
refacrot bulk_unreport_user
ElviaBth Nov 29, 2024
5fe1eee
refactor bulk_unhide_content and bulk_unreport_content
ElviaBth Nov 29, 2024
95c770f
update presenter
Nov 29, 2024
56d7def
add admin logs action info
ElviaBth Nov 29, 2024
b62172f
refactor changeset method in UserPresenter
ElviaBth Dec 2, 2024
394fcdf
fix spelling error
ElviaBth Dec 2, 2024
3089f83
add bulk_hide_content
ElviaBth Dec 2, 2024
3ca8977
Update decidim-admin/app/commands/decidim/admin/bulk_action.rb
ElviaBth Dec 3, 2024
90e97ab
apply feedback suggestions
ElviaBth Dec 3, 2024
4230138
refactor bulk_action file
ElviaBth Dec 3, 2024
c2e45d0
refactor bulk actions
ElviaBth Dec 4, 2024
7d20185
add changeset_config method to moderations_presenter
ElviaBth Dec 4, 2024
3030241
ignore unused locales
ElviaBth Dec 4, 2024
66eb8a8
refactor changeset method
ElviaBth Dec 4, 2024
bdb6665
add more checks to admin_log_presenter
ElviaBth Dec 5, 2024
5cc9c87
Merge branch 'develop' into feature/implement_bulk_actions_moderations
ElviaBth Dec 5, 2024
640cd0a
fix spec
ElviaBth Dec 5, 2024
3e024e0
add more checks to moderation spec
ElviaBth Dec 5, 2024
67bf2d4
fix date_picker spec
ElviaBth Dec 5, 2024
999429d
apply feedback changes
ElviaBth Dec 12, 2024
86b15d0
add new class base_user_presenter
ElviaBth Dec 13, 2024
131f395
add perform_action_without_log method
ElviaBth Dec 13, 2024
b9c40d8
fix unreport_resource and unhide_resource specs
ElviaBth Dec 13, 2024
e29030c
Merge branch 'develop' into feature/implement_bulk_actions_moderations
ElviaBth Dec 16, 2024
6b00294
apply feedback suggestions
ElviaBth Dec 17, 2024
22eb588
Update decidim-admin/app/commands/decidim/admin/bulk_unblock_users.rb
ElviaBth Dec 17, 2024
a45dc47
Update decidim-admin/app/commands/decidim/admin/bulk_block_users.rb
ElviaBth Dec 17, 2024
599acb3
fix lint errors
ElviaBth Dec 17, 2024
6424648
remove trailing whitespace
ElviaBth Dec 17, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
hide and show dropdown actions
  • Loading branch information
ElviaBth committed Nov 27, 2024
commit 009fc3b94f6ccc9146e43b33ab1b7ed16aa83af0
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def reportable
end

def reportables
@reportables ||= base_query_finder.where(id: params[:user_id]).map(&:reportable)
@reportables ||= base_query_finder.where(id: params[:user_id])
end

def base_query_finder
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
/* eslint-disable no-invalid-this */
ElviaBth marked this conversation as resolved.
Show resolved Hide resolved
/* eslint no-unused-vars: 0 */
/* eslint id-length: ["error", { "exceptions": ["e"] }] */

$(() => {
const selectedModerationsCount = () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,13 @@
data-auto-focus="false"
data-events="resize">
<ul>
<% if allowed_to?(:block, :moderate_users) %>
<% if params[:blocked] %>
<li>
<button type="button" data-action="unblock-moderated_users">
<%= t("decidim.admin.moderated_users.index.actions.bulk_actions.unblock.title") %>
</button>
</li>
<% else %>
<li>
<button type="button" data-action="block-moderated_users">
<%= t("decidim.admin.moderated_users.index.actions.bulk_actions.block.title") %>
Expand All @@ -29,11 +35,6 @@
</button>
</li>
<% end %>
<li>
<button type="button" data-action="unblock-moderated_users">
<%= t("decidim.admin.moderated_users.index.actions.bulk_actions.unblock.title") %>
</button>
</li>
</ul>
</div>
</div>
2 changes: 1 addition & 1 deletion decidim-admin/config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -715,7 +715,7 @@ en:
unblock:
title: Unblock
update_moderated_user_button: Unblock users
unreport:
unreport:
title: Unreport
ignore:
update_moderated_user_button: Unreport users
Expand Down
Loading