Show stats when deleting a group or project from the Admin Area
Problem
Currently, when deleting a group or project from a the Admin Area group or project overview, only a simple confirmation message is shown. When deleting a group from the group settings, we display a short list of number of subgroups, active and archived projects. This is a measure to make the user aware that there is more content in the group, to prevent accidental deletions. We should ensure this additional content in the message is also shown to the admin and aligned with the message shown for groups and projects being deleted from the group and project settings.
Proposal
Display the stats for what the group contains when deleting a group or project from the Admin Area overview. See also: #397039 (comment 1890767089).
Implementation guide
- Copy logic from /app/views/groups/settings/_remove_button.html.haml#L8 to /app/views/admin/groups/_group.html.haml#L36
- Modify /app/assets/javascripts/init_confirm_danger.js#L9 to work for multiple elements and call in
app/assets/javascripts/pages/admin/groups/index/index.js
Edited by Peter Hegman