Skip to content

Add user moderation template#10016

Merged
ahukkanen merged 11 commits intodecidim:developfrom
i-need-another-coffee:ale/add-moderation-template
Dec 21, 2022
Merged

Add user moderation template#10016
ahukkanen merged 11 commits intodecidim:developfrom
i-need-another-coffee:ale/add-moderation-template

Conversation

@alecslupu
Copy link
Copy Markdown
Contributor

@alecslupu alecslupu commented Nov 1, 2022

🎩 What? Why?

This PR adds a new admin section in the templates area, to allow admins to fill in moderation templates, that can be used later. It automatically supports multiple translations, rendering back to the interface the template in admin's language (current_locale of current logged in user).
Please refer to: #10033 for further details.

This addresses SPAM01

📌 Related Issues

Link your PR to an issue

Testing

  1. go to admin / templates/ Block User Messages
  2. Add a simple template
  3. Go to frontend, find an user, and report it
  4. Visit the admin / Participants / Reported users
  5. Click "Block user" icon
  6. See new Choose template
  7. Choose the previously added template
  8. Observe

📷 Screenshots

Please add screenshots of the changes you're proposing
Empty templates list
Adding new template
Listing templates
Blocking an user
Select template

♥️ Thank you!

@alecslupu alecslupu force-pushed the ale/add-moderation-template branch from 4c4e923 to 2e3af04 Compare November 8, 2022 20:33
@alecslupu alecslupu marked this pull request as ready for review November 8, 2022 21:10
@alecslupu alecslupu self-assigned this Nov 9, 2022
@alecslupu alecslupu force-pushed the ale/add-moderation-template branch 3 times, most recently from 5300bc5 to 8d8099f Compare November 17, 2022 13:48
@alecslupu
Copy link
Copy Markdown
Contributor Author

@andreslucena can you review this ?

@andreslucena
Copy link
Copy Markdown
Member

andreslucena commented Nov 24, 2022

I have a couple suggestions:

  • There's a bug with the active menu in the sidebar:

Selection_433

  • I don't see the i18n keys, can you add them? Never mind, I've just seen it!!

Copy link
Copy Markdown
Member

@andreslucena andreslucena left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some other things that I found out while reviewing this, can you check them out please? Thanks

@alecslupu alecslupu force-pushed the ale/add-moderation-template branch 8 times, most recently from defc487 to 6697ed8 Compare December 8, 2022 06:31
@alecslupu alecslupu force-pushed the ale/add-moderation-template branch from 188c130 to a540b5c Compare December 11, 2022 18:29
@alecslupu alecslupu force-pushed the ale/add-moderation-template branch from a540b5c to ff1b766 Compare December 11, 2022 18:48
andreslucena
andreslucena previously approved these changes Dec 12, 2022
Copy link
Copy Markdown
Member

@andreslucena andreslucena left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've seen just a tiny capital letter change but apart from that LGTM 👍🏽 👍🏽

Co-authored-by: Andrés Pereira de Lucena <andreslucena@users.noreply.github.com>
@alecslupu
Copy link
Copy Markdown
Contributor Author

@andreslucena I have done the changes requested

andreslucena
andreslucena previously approved these changes Dec 12, 2022
Copy link
Copy Markdown
Member

@andreslucena andreslucena left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏽

Copy link
Copy Markdown
Contributor

@ahukkanen ahukkanen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks really good, nice work!

Found a couple places to improve, particularly the added wait_for_ajax method in the specs. Other comments are just minor improvement ideas.

@alecslupu alecslupu force-pushed the ale/add-moderation-template branch from fb56000 to b336e68 Compare December 20, 2022 21:57
@alecslupu alecslupu requested a review from ahukkanen December 21, 2022 00:26
@ahukkanen ahukkanen merged commit df1cf6f into decidim:develop Dec 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Templates justification when blocking a participant

3 participants