{% macro comments_input(category, user, perms, reply_to, return_url) %} {% 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, colour, perms, return_url) %} {% 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 commenterColour = comment.colour %} {% 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 commenterColour = null %} {% 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 perms.can_delete_any|default(false) %} {% if perms.can_delete_any|default(false) or (not comment.deleted or replies|length > 0) %}