35 lines
2 KiB
Twig
35 lines
2 KiB
Twig
<li id="comment-{{ comment.id }}" class="comment-container">
|
|
<div class="comment">
|
|
<a class="avatar avatar--border comment__avatar{% if comment_depth == 0 %} comment__avatar--big{% endif %}" href="{{ route('user.profile', comment.userData.id) }}" style="background-image: url('{{ route('user.avatar', comment.userData.id) }}');">
|
|
<span class="comment__username" style="color: {{ comment.userData.colour }};">
|
|
{{ comment.userData.username }}
|
|
</span>
|
|
</a>
|
|
<div class="comment__pointer"></div>
|
|
<div class="comment__content">
|
|
<div class="comment__controls">
|
|
{% if comment.userData.id == user.id %}
|
|
<div class="fa fa-trash-o comment__control" title="Delete" onclick="commentDelete({{ comment.id }})"></div>
|
|
{% endif %}
|
|
<div class="fa fa-reply comment__control" title="Reply" onclick="commentReply({{ comment.id }}, '{{ session_id() }}', '{{ route('user.avatar', user.id) }}')" id="comment-action-reply-{{ comment.id }}"></div>
|
|
<div class="comment__control comment__control--vote comment__control--vote-up" onclick="commentVote({{ comment.id }}, 1)">
|
|
<span class="fa fa-chevron-up"></span>
|
|
<span id="comment-{{ comment.id }}-likes">{{ comment.upvotes }}</span>
|
|
</div>
|
|
<div class="comment__control comment__control--vote comment__control--vote-down" onclick="commentVote({{ comment.id }}, 0)">
|
|
<span class="fa fa-chevron-down"></span>
|
|
<span id="comment-{{ comment.id }}-dislikes">{{ comment.downvotes }}</span>
|
|
</div>
|
|
</div>
|
|
<div class="comment__text">
|
|
{{ comment.parsed|raw|nl2br }}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<ul class="comment__replies">
|
|
{% set comment_depth = comment_depth + 1 %}
|
|
{% for comment in comment.replies %}
|
|
{% include 'elements/comment.twig' %}
|
|
{% endfor %}
|
|
</ul>
|
|
</li>
|