-
Notifications
You must be signed in to change notification settings - Fork 35
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
Hide checkboxes in archived locations for observer role #3296
base: develop
Are you sure you want to change the base?
Hide checkboxes in archived locations for observer role #3296
Conversation
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.
Thank you for your PR. I have one thought on the implementation. I think it's a good thing that you stuck with the implementation as we have it in the other templates. However, I can see one problem we might want to think about :) Let me know what you think :)
value="{{ poi.id }}" | ||
form="bulk-action-form" | ||
class="bulk-select-item" /> | ||
{% if perms.cms.change_poi %} |
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.
This has a small side effect: The rows loses the padding to the top and bottom, and shrinks a little bit (s. screenshot).
I'm sure there are better ways to do it, but I couldn't come up with one and wanted to share at least one idea, so here we go :)
I think I would move the permission check one hierarchy up.
{% if perms.cms.change_poi %} | |
{% if perms.cms.change_poi %} | |
<td class="py-3 pl-4 pr-2"> |
and then add to next element the classes in case you can't change the poi (s. below).
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.
@JoeyStk thank you for your suggestion :) Unfortunately, if I put it above, the whole row moves on the left side, so I used instead the class option
value="{{ poi.id }}" | ||
form="bulk-action-form" | ||
class="bulk-select-item" /> | ||
{% endif %} | ||
</td> | ||
<td class="pr-2"> |
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.
<td class="pr-2"> | |
<td class="pr-2 {% if not perms.cms.change_poi %} py-3 pl-4 pr-2 {% 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.
If you chose to go with this suggestion, please don't forget to also apply this to the poi_list_archived.html
template :)
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.
the problem was with the row... so i did not change here anything :)
98edb0c
to
d6f4e3b
Compare
Short description
This is the follow up implementation of the #3014 During the implementation I forgot to remove checkboxes for archived locations as well.
Proposed changes
Side effects
Resolved issues
Fixes: #3262
Pull Request Review Guidelines