-
Notifications
You must be signed in to change notification settings - Fork 279
Add multi-delete for users. #3138
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
Conversation
8e14910
to
5294e6b
Compare
Also generalize multi-delete code where it makes sense. More progress towards DOMjudge#229.
5294e6b
to
f393dea
Compare
Now also including teams, team affiliation, and team categories. |
Also handle plural correctly of entities ending with "y". Part of DOMjudge#229.
d9336b6
to
dcf6d9b
Compare
{% block title %} | ||
{% if count > 1 %} | ||
Delete {{ count }} {{ type }}s | ||
Delete {{ count }} {% if type|slice(-1) == 'y' %}{{ type|slice(0, -1) }}ies{% else %}{{ type }}s{% endif %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@eldering this is the fix for pluralizing team category
'name' => ['title' => 'name', 'sort' => true, 'default_sort' => true], | ||
]; | ||
|
||
if ($this->isGranted('ROLE_ADMIN')) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we maybe make a generalized method of this in the base class? Also for the one below? So that we don't have this repeated html everywhere, if we ever want to change styling or something.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, please check the last two commits.
6c2517d
to
1183e9f
Compare
I think we should add unit tests for this, |
Do we have good examples for unit tests where individual entities get deleted? |
ac7c09e
to
97acf0a
Compare
@vmcj I have added a unit test for the problems entity in the last commit, PTAL. |
97acf0a
to
e3cf6a1
Compare
Also generalize multi-delete code where it makes sense.
More progress towards #229.