From a0ad1fdd542233869ed904602fb810d37a4d68b7 Mon Sep 17 00:00:00 2001 From: Nikolai Lopin Date: Mon, 24 Jun 2024 21:06:47 +0200 Subject: [PATCH] refactor: place comment form correctly for pinned posts --- frontend/html/comments/types/bold.html | 178 ++++++++++++------------- 1 file changed, 89 insertions(+), 89 deletions(-) diff --git a/frontend/html/comments/types/bold.html b/frontend/html/comments/types/bold.html index 6dfaa6e96..fe6a9591e 100644 --- a/frontend/html/comments/types/bold.html +++ b/frontend/html/comments/types/bold.html @@ -1,107 +1,107 @@ {% load text_filters %} {% load posts %} {% load comments %} -
-
- - Аватар {{ comment.author.full_name }} - -
-
- - - - {{ comment.author.full_name }} - - {% if comment.author_id in user_notes %} - {{ user_notes|lookup:comment.author_id|truncatechars:128 }} - {% else %} - {{ comment.author.position }} - {% endif %} - {% if comment.author.hat %}{% include "users/widgets/hat.html" with hat=comment.author.hat %}{% endif %} - {% if comment.author == post.author %}{% include "users/widgets/hat_author.html" %}{% endif %} - - {% if me and comment.author_id != me.id and not comment.author.deleted_at %} - - +
+
+ +
+ + + + {{ comment.author.full_name }} - {% endif %} - + {% if comment.author_id in user_notes %} + {{ user_notes|lookup:comment.author_id|truncatechars:128 }} + {% else %} + {{ comment.author.position }} + {% endif %} + {% if comment.author.hat %}{% include "users/widgets/hat.html" with hat=comment.author.hat %}{% endif %} + {% if comment.author == post.author %}{% include "users/widgets/hat_author.html" %}{% endif %} - - {{ comment.created_at | cool_date }} - - + {% if me and comment.author_id != me.id and not comment.author.deleted_at %} + + + + {% endif %} + -
- {% if comment.metadata.badges %} -
- {% include "badges/widgets/badges.html" with badges=comment.metadata.badges %} -
+ + {{ comment.created_at | cool_date }} + + - {% if me and comment.author_id != me.id and not comment.author.deleted_at %} - - - +
+ {% if comment.metadata.badges %} +
+ {% include "badges/widgets/badges.html" with badges=comment.metadata.badges %} +
+ + {% if me and comment.author_id != me.id and not comment.author.deleted_at %} + + + + {% endif %} {% endif %} - {% endif %} +
-
-
- - +
+ + - {% if comment.is_pinned %} -
- {% endif %} -
-
-
- {% render_comment comment %} + {% if comment.is_pinned %} +
+ {% endif %}
-
- -
- -
-{% if replies %} -
- {% for reply_tree in replies %} - {% include "comments/types/reply.html" with comment=reply_tree.comment reply_to=reply_tree.comment replies=reply_tree.replies %} - {% endfor %} + {% if replies %} +
+ {% for reply_tree in replies %} + {% include "comments/types/reply.html" with comment=reply_tree.comment reply_to=reply_tree.comment replies=reply_tree.replies %} + {% endfor %} +
+
+ {% endif %}
-
-{% endif %}