##// 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>
35 <a class="post_id" href="{% post_url post.id %}">
37 {% cache 600 post_id post.id %}
36 ({{ post.id }}) </a>
38 <a class="post_id" href="{% post_url post.id %}">
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 %}
@@ -70,20 +74,20 b''
70 {% endif %}
74 {% endif %}
71 {% endautoescape %}
75 {% endautoescape %}
72 {% cache 600 post_replies post.id post.last_edit_time moderator LANGUAGE_CODE %}
76 {% cache 600 post_replies post.id post.last_edit_time moderator LANGUAGE_CODE %}
73 {% if post.is_referenced %}
77 {% if post.is_referenced %}
74 <div class="refmap">
78 <div class="refmap">
75 {% trans "Replies" %}:
79 {% trans "Replies" %}:
76 {% for ref_post in post.get_sorted_referenced_posts %}
80 {% for ref_post in post.get_sorted_referenced_posts %}
77 <a href="{% post_url ref_post.id %}">&gt;&gt;{{ ref_post.id }}</a
81 <a href="{% post_url ref_post.id %}">&gt;&gt;{{ ref_post.id }}</a
78 >{% if not forloop.last %},{% endif %}
82 >{% if not forloop.last %},{% endif %}
79 {% endfor %}
83 {% endfor %}
80 </div>
84 </div>
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