This repository has been archived on 2024-06-26. You can view files and clone it, but cannot push or open issues or pull requests.
sakura/templates/yuuno/elements/comment.twig

30 lines
2.7 KiB
Twig
Raw Normal View History

2016-03-28 14:47:43 +00:00
<li id="comment-{{ comment.id }}">
<div class="comment">
2016-03-28 14:47:43 +00:00
<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>
2016-03-28 14:47:43 +00:00
{% if comment.userData.id == user.id %}
<li><a href="{{ urls.format('COMMENT_DELETE', [comment.id, comment.category, session_id()])}}" class="clean fa fa-trash-o comment-deletion-link" title="Delete" id="comment-action-delete-{{ comment.id }}"></a></li>
{% else %}
2016-03-28 14:47:43 +00:00
<li><a href="{{ urls.format('USER_REPORT', [comment.userData.id]) }}" class="clean fa fa-exclamation-circle" title="Report" id="comment-action-report-{{ comment.id }}"></a></li>
{% endif %}
2016-03-28 14:47:43 +00:00
<li><a href="javascript:void(0);" onclick="commentReply({{ comment.id }}, '{{ session_id() }}', '{{ comment.category }}', '{{ urls.format('COMMENT_POST') }}', '{{ 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="{{ urls.format('COMMENT_VOTE', [comment.id, 1, comment.category, session_id()])}}" class="clean comment-like-link" id="comment-action-like-{{ comment.id }}"><span class="fa fa-thumbs-up"></span> <span id="comment-{{ comment.id }}-likes">{{ comment.upvotes }}</span></a></li>
<li class="shown voting dislike"><a id="comment-action-dislike-{{ comment.id }}" href="{{ urls.format('COMMENT_VOTE', [comment.id, 0, comment.category, session_id()])}}" class="clean comment-dislike-link"><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">
2016-03-28 14:47:43 +00:00
{{ comment.parsed|raw|nl2br }}
</div>
</div>
</div>
<ul>
2016-03-28 14:47:43 +00:00
{% for comment in comment.replies %}
2016-01-04 20:14:09 +00:00
{% include 'elements/comment.twig' %}
{% endfor %}
</ul>
</li>