# HG changeset patch # User neko259 # Date 2014-01-22 13:04:58 # Node ID 1c1f004fd815b11301abbff0802f259dafd35cf1 # Parent 4b322d4d8de5ba7d0ddc9a39f43e5efbd623abb6 Some more optimization to the post html 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 @@
- {% if post.is_opening and thread.tags.exists %} + {% if is_opening and thread.tags.exists %} {% 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 + }