{% macro comments_input(category, user, reply_to) %} {% set reply_mode = reply_to is not null %} {% from 'macros.twig' import avatar %} {% from '_layout/input.twig' import input_hidden, input_csrf, input_checkbox %}
{% endmacro %} {% macro comments_entry(comment, indent, category, user) %} {% from 'macros.twig' import avatar %} {% from '_layout/input.twig' import input_checkbox_raw %} {% set replies = comment.replies %} {% set poster = comment.user|default(null) %} {% if comment.post is defined %} {% set userVote = comment.vote.weight %} {% set comment = comment.post %} {% set body = comment.body %} {% set likes = comment.votesPositive %} {% set dislikes = comment.votesNegative %} {% set isReply = comment.isReply %} {% else %} {% set body = comment.text %} {% set userVote = comment.userVote %} {% set likes = comment.likes %} {% set dislikes = comment.dislikes %} {% set isReply = comment.hasParent %} {% endif %} {% set hide_details = poster is null or comment.deleted and not user.commentPerms.can_delete_any|default(false) %} {% if user.commentPerms.can_delete_any|default(false) or (not comment.deleted or replies|length > 0) %}