{%- include "component/comment/usernote_header.html" -%} {# "level" represents the nested level in this call; always starts at 1 #} {# this is distinct from "comment.level", which is the global depth of this comment #} {% macro single_comment(c, level) %} {%- if render_ctx is not defined -%} {% set render_ctx = 'comments' %} {%- endif -%} {%- set ups = c.upvotes_str(render_ctx) -%} {%- set score = c.score_str(render_ctx) -%} {%- set downs = c.downvotes_str(render_ctx) -%} {%- set replies = c.replies(v) -%} {%- set is_notification_page = request.path.startswith('/notifications') -%} {% if (c.is_banned or c.deleted_utc or c.is_blocking) and not (v and v.admin_level >= 2) and not (v and v.id==c.author_id) %}
{% if standalone and c.over_18 %}+18{% endif %} {% if c.is_banned %}removed by @{{c.ban_reason}}{% elif c.deleted_utc %}Deleted by author{% elif c.is_blocking %}You are blocking @{{c.author_name}}{% endif %}
{% if render_replies %} {% if level <= RENDER_DEPTH_LIMIT - 1 %}
{% set standalone=False %} {% for reply in replies %} {{single_comment(reply, level=level+1)}} {% endfor %}
{% elif replies and is_notification_page %}
{% set standalone=False %} {% for reply in replies %} {{single_comment(reply, level=level+1)}} {% endfor %}
{% elif replies %}
More comments
{% endif %} {% endif %}
{% else %} {%- set voted = c.voted_display(v) -%} {% if standalone and level==1 %}
{% if c.post and c.post.over_18 %}+18{% endif %} {{c.header_msg(v, is_notification_page, replies | length) | safe}}
{% endif %} {% set isreply = not standalone and c.parent_comment and c.parent_comment.sentto %}
{% if not isreply %}
{% endif %} {%- include 'component/comment/user_info.html' -%}
{%- include 'component/comment/reports.html'-%} {% if c.is_banned and c.ban_reason %} {# TODO: shouldn't be visible. See #359 #}
removed by @{{c.ban_reason}}
{% endif %}
{{c.realbody(v) | safe}}
{% if c.parent_submission %} {%- include 'component/comment/editbox_comment.html' -%}
    {% if v and v.admin_level >= 2 %}
  • {% endif %} {% if v %} {% endif %}
  • {%- include 'component/comment/voting_mobile.html' -%}
  • {%- include 'component/comment/voting_desktop.html' -%} {%- include 'component/comment/actions_desktop.html' -%}
{% endif %}
{% if v and v.id != c.author_id and c.body %} {% endif %} {%- include 'component/comment/replybox_comment.html' -%} {% if render_replies %} {% if level <= RENDER_DEPTH_LIMIT - 1 or is_notification_page %}
{% for reply in replies %} {{single_comment(reply, level=level+1)}} {% endfor %}
{% elif replies %}
More comments
{% endif %} {% if is_notification_page and c.level == 1 and c.sentto and not c.parent_submission and c.author_id not in (NOTIFICATIONS_ID, AUTOJANNY_ID) %} {%- include 'component/comment/replybox_message.html' -%} {% endif %} {% else %}
{% endif %}
{%- include 'component/comment/actions_mobile.html' -%} {% if v and v.admin_level >= 2 %} {%- include 'component/comment/actions_mobile_admin.html' -%} {% endif %}
{% endif %} {% endmacro %} {% for comment in comments %} {%- set parent_level = parent_level | int if parent_level else 0 -%} {{single_comment(comment, level = parent_level + 1)}} {% endfor %} {%- include 'component/comment/view_more_button.html' -%} {% if not ajax %} {% if v %} {% if v.admin_level >= 2 %} {% include "component/modal/ban.html" %} {% endif %} {%- include 'component/modal/delete_comment.html' -%} {%- include 'component/modal/report_comment.html' -%} {% endif %} {% if v %} {% if FEATURES['AWARDS'] %} {% endif %} {% endif %} {% if v %} {% if v.admin_level >= 2 %} {% endif %} {% if v.admin_level >= 2 %} {% endif %} {% endif %} {% include "component/modal/expanded_image.html" %} {% endif %}