{%- import 'util/macros.html' as macros with context -%} {% if not request.headers.get("xhr") %} {% if comment_info %} {% endif %} {% if v %} {% include "modals/award.html" %} {% endif %} {% include "popover.html" %} {% endif %} {% set disable_votes = (request.path.startswith('/@') and not wall) and v and v.admin_level < PERMS['ENABLE_VOTE_BUTTONS_ON_USER_PAGE'] %} {% macro single_comment(c, level=1, collapse=False) %} {% if can_see(v, c) %} {% set ups=c.upvotes %} {% set downs=c.downvotes %} {% set score=ups-downs %} {% if render_replies %} {% set replies=c.replies(sort=sort) %} {% endif %} {% if (c.is_banned or c.deleted_utc) and not (v and v.admin_level >= PERMS['POST_COMMENT_MODERATION']) and not (v and v.id == c.author_id) %}
{% if render_replies %}
{% if level<9 or request.path.startswith('/notifications') %} {% for reply in replies %} {{single_comment(reply, level=level+1)}} {% endfor %} {% elif replies %} More comments {% endif %}
{% endif %}
{% else %} {% set score=c.score %} {% if v %} {% set voted=c.voted %} {% if not voted and v.id == c.author_id %} {% set voted=1 %} {% endif %} {% else %} {% set voted=-2 %} {% endif %} {% if standalone and level == 1 %}
{% if c.parent_post and c.post.nsfw %} NSFW {% endif %} {% if c.parent_post %} {% if request.path == '/notifications' and c.parent_post in v.subscribed_idlist %} Subscribed Thread: {{c.post.realtitle(v) | safe}} {% else %} {{c.post.realtitle(v) | safe}} {% endif %} {% if c.post.hole %} in /h/{{c.post.hole}} {% endif %} {% elif c.author_id == AUTOJANNY_ID %} Notification {% elif c.wall_user_id %} {% if not wall %} {% if c.wall_user_id == v.id %} Your Profile Wall {% else %} @{{c.wall_user.username}}'s Profile Wall {% endif %} {% endif %} {% elif c.sentto == MODMAIL_ID %} Sent to admins {% elif c.sentto == v.id %} Sent to you {% else %} Sent to @{{c.senttouser.username}} {% endif %}
{% endif %} {% if c.parent_comment and c.parent_comment.sentto %} {% set isreply = True %} {% else %} {% set isreply = False %} {% endif %}
{% if not isreply %} {% endif %}
{{macros.reports(c, 'comment')}} {% if c.is_banned %}
Removed by @{{c.ban_reason}} (Site Admin)
{% endif %} {% set realbody = c.realbody(v) %} {% set tilt = c.award_count('tilt', v) %}
{{realbody | safe}}
{% if c.parent_post or c.wall_user_id %} {% if v and (v.id == c.author_id or v.admin_level >= PERMS['POST_COMMENT_EDITING']) %} {% endif %} {% if not c.ghost %} {{c.author.rendered_sig(v) | safe}} {% endif %}
  • {% if v and v.admin_level >= PERMS['POST_COMMENT_MODERATION'] %} {% endif %}
  • {% if v and not c.deleted_utc %} {% endif %}
  • {% if v %}
  • {{score}}
  • {% else %}
  • {{score}}
  • {% endif %}
  • {% if v %} {% else %} {% endif %} {{score}} {% if v %} {% else %} {% endif %} {% if v and (not c.ghost or v.admin_level >= PERMS['SEE_GHOST_VOTES']) %} Votes {% endif %} Context {% if v %} {% if not c.deleted_utc %} {% endif %} {% if FEATURES['AWARDS'] -%} {%- endif %} {% endif %} {% if v and (c.parent_post or c.wall_user_id) %} {% if c.author_id == v.id or v.admin_level >= PERMS['POST_COMMENT_EDITING'] %} {% elif c.body %} {% endif %} {% if c.author_id == v.id %} {% endif %} {% endif %} {% if v %} {% endif %}
{% endif %}
{% if v and v.id != c.author_id and c.body %}
{{c.body.strip()}}
{% endif %} {% if c.parent_post or c.wall_user_id %} {{macros.comment_reply_box(c.fullname, "reply-to-" + c.fullname, "d-none", "collapsed child", 'reply-to-' + c.fullname, true)}} {% endif %} {% if request.path.startswith('/transfers') %} {% endif %} {% if render_replies %}
{% if request.path.startswith('/notifications') and replies|length > 8 %} {% for reply in replies %} {% if reply.parent_post %} {% set collapse = reply.collapse %} {% else %} {% set collapse = not reply.unread and loop.index != replies|length %} {% endif %} {{single_comment(reply, level=level+1, collapse=collapse)}} {% endfor %} {% elif request.path.startswith('/notifications') or level < 9 %} {% for reply in replies %} {{single_comment(reply, level=level+1)}} {% endfor %} {% elif replies %} More comments {% endif %}
{% if (request.path.startswith('/notifications') or request.path == '/search/messages') and c.level == 1 and c.sentto and not c.parent_post and c.author_id != AUTOJANNY_ID %} {% if c.sentto == MODMAIL_ID and v and v.id != c.author_id and v.admin_level >= PERMS['USER_BAN'] %} {% endif %} {% if c.author_id != v.id and request.path == '/notifications/messages' %} {% endif %}
{% endif %} {% else %}
{% endif %}
{% if v and v.admin_level >= PERMS['POST_COMMENT_MODERATION'] %} {% endif %}
{% endif %} {% endif %} {% endmacro %} {% for comment in comments %} {{single_comment(comment)}} {% endfor %} {% if not request.headers.get("xhr") %} {% if v %} {% include "modals/emoji.html" %} {% include "modals/gif.html" %} {% if v.admin_level >= PERMS['USER_BAN'] %} {% include "modals/punish.html" %} {% endif %} {% endif %} {% if v %} {% endif %} {% if v and v.admin_level >= PERMS['POST_COMMENT_MODERATION'] %} {% endif %} {% endif %} {% if p %} {% set pid = p.id %} {% endif %} {% if offset %}
{% endif %}