{# This file is similar to _post_reply_teaser.html except it includes the render_username macro and removes a few things that aren't needed on brand new comments. We need to include that macro because this template is used as part of a full page (it's an ajax response) so it does not inherit from base.html where the macro is normally defined. #} {% macro render_username(user, add_domain=True, htmx_redirect_back_to=None) -%} {% if user.deleted -%} {% if current_user.is_authenticated and current_user.is_admin() -%} [deleted] {% else -%} [deleted] {% endif -%} {% else -%} {% if user.avatar_id and not low_bandwidth and not collapsed -%} {% endif -%} {{ user.display_name() }}{% if add_domain and not user.is_local() %}@{{ user.ap_domain }}{% endif %}
{% if user.created_recently() -%} {% endif -%} {% if user.bot -%} {% endif -%} {% if user.id != current_user.id -%} {% if user.reputation < -10 -%} {% elif user.reputation < 0 -%} {% endif -%} {% endif -%} {% if current_user.is_authenticated -%} {% set user_note = user.get_note(current_user) %} {% if user_note -%} [{{ user_note | truncate(12, True) }}] {% endif -%} {% endif -%} {% endif -%}
{% endmacro -%} {% set collapsed = false -%}
by {{ render_username(post_reply.author, htmx_redirect_back_to=request.path + '#comment_' + str(post_reply.id)) }} {% if post_reply.author.id == post_reply.post.author.id -%} [OP] {% endif -%}
{% if post_reply.edited_at -%}, edited {% endif -%}
{% if post_reply.reports and current_user.is_authenticated and post_reply.post.community.is_moderator(current_user) -%} {% endif -%}
{% if post_reply.deleted -%} {% endif -%}
{{ post_reply.body_html | community_links | person_links | safe }}
reply
{% with comment=post_reply, community=post_reply.post.community -%} {% include "post/_comment_voting_buttons.html" -%} {% endwith -%}
{% if collapsed -%} {% else -%} {% endif -%}
{% if current_user.is_authenticated and current_user.verified -%} {% with comment=dict(comment=post_reply) -%} {% include "post/_reply_notification_toggle.html" -%} {% endwith -%} {% endif -%}