{% import '@ChillPerson/AccompanyingCourse/Comment/macro_showItem.html.twig' as m %} {% macro recordAction(comment) %} {% if is_granted('CHILL_MAIN_NOTIFICATION_COMMENT_EDIT', comment) %}
  • {% endif %} {% endmacro %}

    {{ 'notification.comments_list'|trans }}

    {% if notification.comments|length > 0 %}
    {% for comment in notification.comments %} {% if editedCommentForm is null or editedCommentId != comment.id %} {{ m.show_comment(comment, { 'recordAction': _self.recordAction(comment) }) }} {% else %}
    {{ form_start(editedCommentForm) }} {{ form_errors(editedCommentForm) }} {{ form_widget(editedCommentForm.content) }} {{ form_end(editedCommentForm) }}
    {% endif %} {% endfor %}
    {% else %} {{ 'No comments'|trans }} {% endif %} {% if appendCommentForm is not null %}

    {{ 'Write a new comment'|trans }}

    {{ form_start(appendCommentForm) }} {{ form_errors(appendCommentForm) }} {{ form_widget(appendCommentForm.content) }} {{ form_end(appendCommentForm) }}
    {% endif %}