2024-02-07 17:31:12 +13:00
{% if theme() and file_exists('app/templates/themes/' + theme() + '/base.html') %}
{% extends 'themes/' + theme() + '/base.html' %}
{% else %}
{% extends "base.html" %}
{% endif %} %}
2023-10-16 21:38:36 +13:00
{% from 'bootstrap/form.html' import render_form %}
{% block app_content %}
< div class = "row" >
2023-11-09 21:32:29 +13:00
< div class = "col-12 col-md-8 position-relative main_pane" >
2023-11-30 06:36:08 +13:00
{% include 'post/_post_full.html' %}
2023-12-10 15:10:09 +13:00
< p > < a href = "{{ url_for('activitypub.post_ap', post_id=post.id, _anchor='replies') }}" > Back to main discussion< / a > < / p >
2023-10-16 21:38:36 +13:00
< div class = "row post_replies" >
< div class = "col" >
{% macro render_comment(comment) %}
2024-02-26 15:52:55 +13:00
< div id = "comment_{{ comment['comment'].id }}" class = "comment {% if comment['comment'].author.id == post.author.id %}original_poster{% endif %}" role = "treeitem" >
2023-10-16 21:38:36 +13:00
< div class = "limit_height" >
< div class = "comment_author" >
2024-07-04 14:23:00 +02:00
{% with collapsed = comment['comment'].score < -10 - % }
{{ render_username(comment['comment'].author) }}
{% endwith -%}
2024-07-01 18:17:27 +08:00
{% if comment['comment'].author.id == post.author.id %}< span title = "Submitter of original post" aria-label = "submitter" class = "small" > [OP] < / span > {% endif %}
2024-08-23 11:14:47 +12:00
< span class = "text-muted small" > {{ arrow.get(comment['comment'].posted_at).humanize(locale=locale) }}{% if comment['comment'].edited_at %}, edited {{ arrow.get(comment['comment'].edited_at).humanize(locale=locale) }} {% endif %}< / span >
2024-01-18 09:42:45 +13:00
< a class = "unhide" href = "#" > < span class = "fe fe-expand" > < / span > < / a >
{% if comment['comment'].reports and current_user.is_authenticated and post.community.is_moderator(current_user)%}
< span class = "red fe fe-report" title = "{{ _('Reported. Check comment for issues.') }}" > < / span >
{% endif %}
2023-10-16 21:38:36 +13:00
< / div >
2024-01-18 09:42:45 +13:00
< div class = "comment_body hidable {% if comment['comment'].reports and current_user.is_authenticated and post.community.is_moderator(current_user) %}reported{% endif %}" >
2023-10-16 21:38:36 +13:00
{{ comment['comment'].body_html | safe }}
< / div >
< / div >
< div class = "comment_actions hidable" >
2023-12-14 21:22:46 +13:00
{% if post.comments_enabled %}
< a href = "{{ url_for('post.add_reply', post_id=post.id, comment_id=comment['comment'].id) }}" rel = "nofollow" > < span class = "fe fe-reply" > < / span > reply< / a >
{% endif %}
2024-01-18 09:42:45 +13:00
< div class = "voting_buttons_new" >
{% with comment=comment['comment'] %}
{% include "post/_comment_voting_buttons.html" %}
{% endwith %}
< / div >
< div class = "hide_button" >
{% if comment['comment'].score < = -10 %}
< a href = '#' > < span class = "fe fe-expand" > < / span > < / a >
{% else %}
< a href = '#' > < span class = "fe fe-collapse" > < / span > < / a >
{% endif %}
< / div >
2024-07-10 16:28:51 +02:00
< div class = "notify_toggle" >
{% if current_user.is_authenticated and current_user.verified and current_user.id == comment['comment'].author.id %}
{% include "post/_reply_notification_toggle.html" %}
{% endif %}
< / div >
2024-01-18 09:42:45 +13:00
< a href = "{{ url_for('post.post_reply_options', post_id=post.id, comment_id=comment['comment'].id) }}" class = "comment_actions_link" rel = "nofollow" > < span class = "fe fe-options" title = "Options" > < / span > < / a >
2023-10-16 21:38:36 +13:00
< / div >
{% if comment['replies'] %}
2024-02-26 15:52:55 +13:00
< div class = "replies hidable" role = "group" >
2023-10-16 21:38:36 +13:00
{% for reply in comment['replies'] %}
{{ render_comment(reply) | safe }}
{% endfor %}
< / div >
{% endif %}
< / div >
{% endmacro %}
2024-02-26 15:52:55 +13:00
< div id = "replies" class = "comments" role = "tree" >
2023-10-16 21:38:36 +13:00
{% for reply in replies %}
{{ render_comment(reply) | safe }}
{% endfor %}
< / div >
< / div >
< / div >
< / div >
2024-07-09 14:24:43 +02:00
{% with community = post.community -%}
{% include "_side_pane.html" %}
{% endwith -%}
2023-10-16 21:38:36 +13:00
< / div >
{% endblock %}