src/CoreBundle/Resources/views/Work/comments.html.twig
{% autoescape false %}
<hr />
<h3>
{{ 'Comments' | trans }}
</h3>
<hr>
<ul>
{% for comment in work.comments %}
<li>
<div class="page-header">
<img height="24" src="{{ comment.user | illustration }}"/> {{ comment.user.username }}
- {{ comment.sentAt | date_to_time_ago }}
</div>
<p>
{% if comment.comment is not empty %}
{{ comment.comment }}
{% else %}
{{ 'Here is your feedback' | trans }}
{% endif %}
</p>
{% if comment.resourceNode.hasResourceFile %}
<ul class="fa-ul">
<li>
<span class="fa-li fa fa-paperclip"></span>
<a
href="{{ url('chamilo_core_resource_view', {
'id': comment.resourceNode.id,
'type' : 'student_publications_comments',
'tool' : 'student_publications',
})
}}"
/>
{{ comment.resourceNode.firstResourceFile }}
</a>
{# {% if is_allowed_to_edit %}#}
{# <a href="{{ comment.delete_file_url }}">#}
{# {{ 'delete.png'|img(22, 'Delete'|trans) }}#}
{# </a>#}
{# {% endif %}#}
{% endif %}
{# {% if comment.file_url is not empty %}#}
{# <ul class="fa-ul">#}
{# <li>#}
{# <span class="fa-li fa fa-paperclip"></span>#}
{# <a href="{{ comment.file_url }}">#}
{# {{ comment.file_name_to_show }}#}
{# </a>#}
{# {% if is_allowed_to_edit %}#}
{# <a href="{{ comment.delete_file_url }}">#}
{# {{ 'delete.png'|img(22, 'Delete'|trans) }}#}
{# </a>#}
{# {% endif %}#}
{# </li>#}
{# </ul>#}
{# {% endif %}#}
</li>
{% endfor %}
</ul>
<br />
{% endautoescape %}