##// END OF EJS Templates
Some more optimization to the post html
neko259 -
r571:1c1f004f 1.7-dev
parent child Browse files
Show More
@@ -5,6 +5,8 b''
5 {% get_current_language as LANGUAGE_CODE %}
5 {% get_current_language as LANGUAGE_CODE %}
6
6
7 {% cache 600 post post.id thread.last_edit_time truncated moderator LANGUAGE_CODE need_open_link %}
7 {% cache 600 post post.id thread.last_edit_time truncated moderator LANGUAGE_CODE need_open_link %}
8
9 {% with is_opening=post.is_opening %}
8 {% spaceless %}
10 {% spaceless %}
9 {% with thread=post.thread_new %}
11 {% with thread=post.thread_new %}
10 {% if thread.archived %}
12 {% if thread.archived %}
@@ -32,8 +34,10 b''
32 <div class="message">
34 <div class="message">
33 <div class="post-info">
35 <div class="post-info">
34 <span class="title">{{ post.title }}</span>
36 <span class="title">{{ post.title }}</span>
37 {% cache 600 post_id post.id %}
35 <a class="post_id" href="{% post_url post.id %}">
38 <a class="post_id" href="{% post_url post.id %}">
36 ({{ post.id }}) </a>
39 ({{ post.id }}) </a>
40 {% endcache %}
37 [<span class="pub_time">{{ post.pub_time }}</span>]
41 [<span class="pub_time">{{ post.pub_time }}</span>]
38 {% if thread.archived %}
42 {% if thread.archived %}
39 — [{{ thread.bump_time }}]
43 — [{{ thread.bump_time }}]
@@ -42,7 +46,7 b''
42 [<a href="#" onclick="javascript:addQuickReply('{{ post.id }}')
46 [<a href="#" onclick="javascript:addQuickReply('{{ post.id }}')
43 ; return false;">&gt;&gt;</a>]
47 ; return false;">&gt;&gt;</a>]
44 {% endif %}
48 {% endif %}
45 {% if post.is_opening and need_open_link %}
49 {% if is_opening and need_open_link %}
46 {% if post.thread_new.archived %}
50 {% if post.thread_new.archived %}
47 [<a class="link" href="{% url 'thread' post.id %}">{% trans "Open" %}</a>]
51 [<a class="link" href="{% url 'thread' post.id %}">{% trans "Open" %}</a>]
48 {% else %}
52 {% else %}
@@ -81,9 +85,9 b''
81 {% endif %}
85 {% endif %}
82 {% endcache %}
86 {% endcache %}
83 </div>
87 </div>
84 {% if post.is_opening and thread.tags.exists %}
88 {% if is_opening and thread.tags.exists %}
85 <div class="metadata">
89 <div class="metadata">
86 {% if post.is_opening and need_open_link %}
90 {% if is_opening and need_open_link %}
87 {{ thread.get_images_count }} {% trans 'images' %}.
91 {{ thread.get_images_count }} {% trans 'images' %}.
88 {% endif %}
92 {% endif %}
89 <span class="tags">
93 <span class="tags">
@@ -97,4 +101,5 b''
97 </div>
101 </div>
98 {% endwith %}
102 {% endwith %}
99 {% endspaceless %}
103 {% endspaceless %}
104 {% endwith %}
100 {% endcache %}
105 {% endcache %}
@@ -73,4 +73,4 b' def post_view_truncated(post, need_open_'
73 'truncated': True,
73 'truncated': True,
74 'need_open_link': need_open_link,
74 'need_open_link': need_open_link,
75 'moderator': moderator,
75 'moderator': moderator,
76 } No newline at end of file
76 }
General Comments 0
You need to be logged in to leave comments. Login now