29 lines
2.3 KiB
Twig
29 lines
2.3 KiB
Twig
<li id="comment-{{ comment.id }}">
|
|
<div class="comment">
|
|
<a class="comment-avatar clean" href="{{ route('user.profile', comment.userData.id) }}" style="background-image: url('{{ route('file.avatar', comment.userData.id) }}');"><span style="color: {{ comment.userData.colour }};">{{ comment.userData.username }}</span></a>
|
|
<div class="comment-pointer"></div>
|
|
<div class="comment-content">
|
|
<div class="comment-controls">
|
|
<ul>
|
|
{% if comment.userData.id == user.id %}
|
|
<li><a href="javascript:void(0);" onclick="commentDelete({{ comment.id }});" class="clean fa fa-trash-o" title="Delete"></a></li>
|
|
{% else %}
|
|
<li><a href="{{ route('user.report', comment.userData.id) }}" class="clean fa fa-exclamation-circle" title="Report"></a></li>
|
|
{% endif %}
|
|
<li><a href="javascript:void(0);" onclick="commentReply({{ comment.id }}, '{{ session_id() }}', '{{ route('file.avatar', user.id) }}');" class="clean fa fa-reply" title="Reply" id="comment-action-reply-{{ comment.id }}"></a></li>
|
|
<li class="shown voting like"><a href="javascript:void(0);" onclick="commentVote({{ comment.id }}, 1);" class="clean"><span class="fa fa-thumbs-up"></span> <span id="comment-{{ comment.id }}-likes">{{ comment.upvotes }}</span></a></li>
|
|
<li class="shown voting dislike"><a href="javascript:void(0);" onclick="commentVote({{ comment.id }}, 0);" class="clean"><span class="fa fa-thumbs-down"></span> <span id="comment-{{ comment.id }}-dislikes">{{ comment.downvotes }}</span></a></li>
|
|
</ul>
|
|
<div class="clear"></div>
|
|
</div>
|
|
<div class="comment-text">
|
|
{{ comment.parsed|raw|nl2br }}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<ul class="comment-replies">
|
|
{% for comment in comment.replies %}
|
|
{% include 'elements/comment.twig' %}
|
|
{% endfor %}
|
|
</ul>
|
|
</li>
|