diff --git a/app/static/styles.css b/app/static/styles.css index 80778e70..5d285818 100644 --- a/app/static/styles.css +++ b/app/static/styles.css @@ -1344,6 +1344,7 @@ time { .comment { clear: both; margin-left: 15px; + padding-left: 0px; padding-top: 8px; } .comment .limit_height { diff --git a/app/static/styles.scss b/app/static/styles.scss index 46349396..394604a7 100644 --- a/app/static/styles.scss +++ b/app/static/styles.scss @@ -998,6 +998,7 @@ time { .comment { clear: both; margin-left: 15px; + padding-left: 0px; padding-top: 8px; .limit_height { diff --git a/app/templates/admin/deleted_posts.html b/app/templates/admin/deleted_posts.html index bf4cef49..75164833 100644 --- a/app/templates/admin/deleted_posts.html +++ b/app/templates/admin/deleted_posts.html @@ -33,7 +33,7 @@

Deleted comments

{% for post_reply in post_replies.items %} - {% with teaser=True, disable_voting=True, no_collapse=True %} + {% with teaser=True, disable_voting=True, no_collapse=True, show_deleted=True %} {% include 'post/_post_reply_teaser.html' %} {% endwith %}
diff --git a/app/templates/admin/spam_posts.html b/app/templates/admin/spam_posts.html index 8c3c98eb..cc9f3a15 100644 --- a/app/templates/admin/spam_posts.html +++ b/app/templates/admin/spam_posts.html @@ -19,7 +19,7 @@

Downvoted comments

{% for post_reply in post_replies.items %} - {% with teaser=True, disable_voting=True, no_collapse=True %} + {% with teaser=True, disable_voting=True, no_collapse=True, show_deleted=True %} {% include 'post/_post_reply_teaser.html' %} {% endwith %}
diff --git a/app/templates/post/_post_reply_teaser.html b/app/templates/post/_post_reply_teaser.html index 29ceb0f2..f0637cd7 100644 --- a/app/templates/post/_post_reply_teaser.html +++ b/app/templates/post/_post_reply_teaser.html @@ -2,6 +2,8 @@ teaser: Renders just a teaser disable_voting: Disable voting buttons (to prevent mass downvoting) no_collapse: Don't collapse for admin and moderator views + show_deleted: Show deleted content (for admin views) + children: replies to this reply #} {% if current_user.is_authenticated -%} {% set collapsed = ((post_reply.score <= current_user.reply_collapse_threshold) or post_reply.deleted) @@ -9,7 +11,7 @@ {% else -%} {% set collapsed = (post_reply.score <= -10) and not no_collapse -%} {% endif -%} -
+
{% if not post_reply.author.indexable -%}{% endif -%} {% if teaser -%}
@@ -52,7 +54,15 @@
- {{ post_reply.body_html | community_links | safe }} + {% if post_reply.deleted and not show_deleted -%} + {% if post_reply.deleted_by is none or post_reply.deleted_by != post_reply.user_id -%} +

Deleted by moderator

+ {% else -%} +

Deleted by author

+ {% endif -%} + {% else -%} + {{ post_reply.body_html | community_links | safe }} + {% endif -%}
@@ -76,7 +86,7 @@ {% endif -%}
- {% if current_user.is_authenticated -%} + {% if current_user.is_authenticated and current_user.verified -%} {% with comment=dict(comment=post_reply) -%} {% include "post/_reply_notification_toggle.html" -%} {% endwith -%} @@ -87,6 +97,23 @@ {% endif -%}
{% if not post_reply.author.indexable -%}{% endif -%} + + {% if children -%} +
+ {% if not THREAD_CUTOFF_DEPTH or post_reply.depth <= THREAD_CUTOFF_DEPTH -%} + {% for reply in children -%} + {% with post_reply=reply['comment'], children=reply['replies'] %} + {% include 'post/_post_reply_teaser.html' %} + {% endwith %} + {% endfor -%} + {% else -%} + + {% endif -%} +
+ {% endif -%} + {% if collapsed -%} - {% endif -%} - {% endmacro -%}
{% for reply in replies -%} - {{ render_comment(reply) | safe }} + {% with post_reply=reply['comment'], children=reply['replies'] %} + {% include 'post/_post_reply_teaser.html' %} + {% endwith %} {% endfor -%}