diff --git a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/Comment/index.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/Comment/index.html.twig
index 56dda187e..5af407d2b 100644
--- a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/Comment/index.html.twig
+++ b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/Comment/index.html.twig
@@ -4,7 +4,28 @@
{{ 'Accompanying Course Comment list'|trans }}
{% endblock %}
-{% import '@ChillPerson/AccompanyingCourse/Comment/macro_showItem.html.twig' as macro %}
+{% import '@ChillPerson/AccompanyingCourse/Comment/macro_showItem.html.twig' as m %}
+
+{% macro recordAction(comment, isPinned) %}
+ {% if isPinned is defined and isPinned == 'true' %}
+ {% else %}
+
+
+
+ {% endif %}
+
+
+
+
+
+
+{% endmacro %}
{% macro form_comment(type, form) %}
{% if type == 'edit' %}
@@ -38,14 +59,19 @@
{% if commentEditId == accompanyingCourse.pinnedComment.id %}
{{ _self.form_comment('edit', edit_form) }}
{% else %}
- {{ macro.show_comment(accompanyingCourse.pinnedComment, {'pinned': 'true'}) }}
+ {{ m.show_comment(accompanyingCourse.pinnedComment, {
+ 'pinned': 'true',
+ 'recordAction': _self.recordAction(accompanyingCourse.pinnedComment, 'true')
+ }) }}
{% endif %}
{% endif %}
- {% for c in accompanyingCourse.comments %}
- {% if commentEditId == c.id %}
+ {% for comment in accompanyingCourse.comments %}
+ {% if commentEditId == comment.id %}
{{ _self.form_comment('edit', edit_form) }}
{% else %}
- {{ macro.show_comment(c) }}
+ {{ m.show_comment(comment, {
+ 'recordAction': _self.recordAction(comment)
+ }) }}
{% endif %}
{% endfor %}
diff --git a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/Comment/macro_showItem.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/Comment/macro_showItem.html.twig
index 82309300e..8812dcdae 100644
--- a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/Comment/macro_showItem.html.twig
+++ b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/Comment/macro_showItem.html.twig
@@ -5,28 +5,16 @@
{% if options.pinned is defined %}
{% endif %}
-
- {{ 'by'|trans }}{{ comment.creator }}{{ ', ' ~ 'on'|trans ~ ' ' ~ comment.createdAt|format_date('long') }}
+
+
+ {% set creator = comment.creator is defined ? comment.creator : comment.createdBy %}
+ {{ 'by'|trans }}{{ creator }}
+
+ {{ ', ' ~ 'on'|trans ~ ' ' ~ comment.createdAt|format_date('long') }}
{{ 'Last updated on'|trans ~ ' ' ~ comment.updatedAt|format_datetime('long', 'short') }}
- {% if options.pinned is not defined %}
- -
-
-
- {% endif %}
- -
-
-
- -
-
-
+ {{ options.recordAction }}