diff --git a/boards/templates/boards/post.html b/boards/templates/boards/post.html --- a/boards/templates/boards/post.html +++ b/boards/templates/boards/post.html @@ -5,6 +5,8 @@ {% get_current_language as LANGUAGE_CODE %} {% cache 600 post post.id thread.last_edit_time truncated moderator LANGUAGE_CODE need_open_link %} + + {% with is_opening=post.is_opening %} {% spaceless %} {% with thread=post.thread_new %} {% if thread.archived %} @@ -32,8 +34,10 @@
{{ post.title }} - - ({{ post.id }}) + {% cache 600 post_id post.id %} + + ({{ post.id }}) + {% endcache %} [{{ post.pub_time }}] {% if thread.archived %} — [{{ thread.bump_time }}] @@ -42,7 +46,7 @@ [>>] {% endif %} - {% if post.is_opening and need_open_link %} + {% if is_opening and need_open_link %} {% if post.thread_new.archived %} [{% trans "Open" %}] {% else %} @@ -70,20 +74,20 @@ {% endif %} {% endautoescape %} {% cache 600 post_replies post.id post.last_edit_time moderator LANGUAGE_CODE %} - {% if post.is_referenced %} -
- {% trans "Replies" %}: - {% for ref_post in post.get_sorted_referenced_posts %} - >>{{ ref_post.id }}{% if not forloop.last %},{% endif %} - {% endfor %} -
- {% endif %} + {% if post.is_referenced %} +
+ {% trans "Replies" %}: + {% for ref_post in post.get_sorted_referenced_posts %} + >>{{ ref_post.id }}{% if not forloop.last %},{% endif %} + {% endfor %} +
+ {% endif %} {% endcache %}
- {% if post.is_opening and thread.tags.exists %} + {% if is_opening and thread.tags.exists %}
- {% if post.is_opening and need_open_link %} + {% if is_opening and need_open_link %} {{ thread.get_images_count }} {% trans 'images' %}. {% endif %} @@ -97,4 +101,5 @@
{% endwith %} {% endspaceless %} + {% endwith %} {% endcache %} diff --git a/boards/templatetags/board.py b/boards/templatetags/board.py --- a/boards/templatetags/board.py +++ b/boards/templatetags/board.py @@ -73,4 +73,4 @@ def post_view_truncated(post, need_open_ 'truncated': True, 'need_open_link': need_open_link, 'moderator': moderator, - } \ No newline at end of file + }