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 a45aef6bb..56dda187e 100644
--- a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/Comment/index.html.twig
+++ b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/Comment/index.html.twig
@@ -4,42 +4,7 @@
{{ 'Accompanying Course Comment list'|trans }}
{% endblock %}
-{% macro show_comment(comment, options) %}
-
-
-
- {% if options.pinned is defined %}
-
- {% endif %}
-
- {{ 'by'|trans }}{{ comment.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 %}
- -
-
-
- -
-
-
-
-
-
-
{{ comment.content|chill_markdown_to_html }}
-
-
-{% endmacro %}
+{% import '@ChillPerson/AccompanyingCourse/Comment/macro_showItem.html.twig' as macro %}
{% macro form_comment(type, form) %}
{% if type == 'edit' %}
@@ -73,14 +38,14 @@
{% if commentEditId == accompanyingCourse.pinnedComment.id %}
{{ _self.form_comment('edit', edit_form) }}
{% else %}
- {{ _self.show_comment(accompanyingCourse.pinnedComment, {'pinned': 'true'}) }}
+ {{ macro.show_comment(accompanyingCourse.pinnedComment, {'pinned': 'true'}) }}
{% endif %}
{% endif %}
{% for c in accompanyingCourse.comments %}
{% if commentEditId == c.id %}
{{ _self.form_comment('edit', edit_form) }}
{% else %}
- {{ _self.show_comment(c) }}
+ {{ macro.show_comment(c) }}
{% 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
new file mode 100644
index 000000000..82309300e
--- /dev/null
+++ b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/Comment/macro_showItem.html.twig
@@ -0,0 +1,36 @@
+{% macro show_comment(comment, options) %}
+
+
+
+ {% if options.pinned is defined %}
+
+ {% endif %}
+
+ {{ 'by'|trans }}{{ comment.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 %}
+ -
+
+
+ -
+
+
+
+
+
+
{{ comment.content|chill_markdown_to_html }}
+
+
+{% endmacro %}