mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 23:23:51 +00:00
unpin comment is possible + delete and edit by all users that can edit period
This commit is contained in:
@@ -8,6 +8,17 @@
|
||||
|
||||
{% macro recordAction(comment, isPinned) %}
|
||||
{% if isPinned is defined and isPinned == true %}
|
||||
<li>
|
||||
<form method="post" action="{{ chill_path_forward_return_path('chill_person_accompanying_period_comment_unpin', {'id': comment.id}) }}">
|
||||
<button class="btn btn-sm btn-misc" type="submit">
|
||||
<span class="fa-stack">
|
||||
<i class="fa fa-flag fa-stack-1x"></i>
|
||||
<i class="fa fa-ban fa-stack-2x text-danger"></i>
|
||||
</span>
|
||||
{{ 'Unpin comment'|trans }}
|
||||
</button>
|
||||
</form>
|
||||
</li>
|
||||
{% else %}
|
||||
<li>
|
||||
<form method="post" action="{{ chill_path_forward_return_path('chill_person_accompanying_period_comment_pin', {'id': comment.id}) }}">
|
||||
@@ -17,7 +28,7 @@
|
||||
</form>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if is_granted('CHILL_PERSON_ACCOMPANYING_PERIOD_COMMENT_EDIT', comment) %}
|
||||
{% if is_granted('CHILL_PERSON_ACCOMPANYING_PERIOD_UPDATE', comment.accompanyingPeriod) %}
|
||||
<li>
|
||||
<a class="btn btn-sm btn-edit" title="{{ 'Edit'|trans }}" href="{{ path('chill_person_accompanying_period_comment_list', {
|
||||
'_fragment': 'comment-' ~ comment.id,
|
||||
@@ -26,7 +37,7 @@
|
||||
}) }}"></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if is_granted('CHILL_PERSON_ACCOMPANYING_PERIOD_COMMENT_DELETE', comment) %}
|
||||
{% if is_granted('CHILL_PERSON_ACCOMPANYING_PERIOD_UPDATE', comment.accompanyingPeriod) %}
|
||||
<li>
|
||||
<a class="btn btn-sm btn-delete" title="{{ 'Delete'|trans }}" href="{{ path('chill_person_accompanying_period_comment_delete', {'id': comment.id}) }}"></a>
|
||||
</li>
|
||||
|
Reference in New Issue
Block a user