##// END OF EJS Templates
Added post cache
neko259 -
r557:235b44eb default
parent child Browse files
Show More
@@ -1,83 +1,85 b''
1 1 {% load i18n %}
2 2 {% load board %}
3 3
4 {% cache 300 post post.id post.thread_new.last_edit_time truncated moderator LANGUAGE_CODE need_open_link %}
4 5 {% spaceless %}
5 6 {% if post.thread_new.archived %}
6 7 <div class="post archive_post" id="{{ post.id }}">
7 8 {% elif post.thread_new.can_bump %}
8 9 <div class="post" id="{{ post.id }}">
9 10 {% else %}
10 11 <div class="post dead_post" id="{{ post.id }}">
11 12 {% endif %}
12 13
13 14 {% if post.image %}
14 15 <div class="image">
15 16 <a
16 17 class="thumb"
17 18 href="{{ post.image.url }}"><img
18 19 src="{{ post.image.url_200x150 }}"
19 20 alt="{{ post.id }}"
20 21 width="{{ post.image_pre_width }}"
21 22 height="{{ post.image_pre_height }}"
22 23 data-width="{{ post.image_width }}"
23 24 data-height="{{ post.image_height }}"/>
24 25 </a>
25 26 </div>
26 27 {% endif %}
27 28 <div class="message">
28 29 <div class="post-info">
29 30 <span class="title">{{ post.title }}</span>
30 31 <a class="post_id" href="{% post_url post.id %}">
31 32 ({{ post.id }}) </a>
32 33 [<span class="pub_time">{{ post.pub_time }}</span>]
33 34 {% if not truncated %}
34 35 [<a href="#" onclick="javascript:addQuickReply('{{ post.id }}')
35 36 ; return false;">&gt;&gt;</a>]
36 37 {% endif %}
37 38 {% if post.is_opening and need_open_link %}
38 39 [<a class="link" href="
39 40 {% url 'thread' post.id %}#form">{% trans "Reply" %}</a>]
40 41 {% endif %}
41 42
42 43 {% if moderator %}
43 44 <span class="moderator_info">
44 45 [<a href="{% url 'delete' post_id=post.id %}"
45 46 >{% trans 'Delete' %}</a>]
46 47 ({{ post.poster_ip }})
47 48 [<a href="{% url 'ban' post_id=post.id %}?next={{ request.path }}"
48 49 >{% trans 'Ban IP' %}</a>]
49 50 </span>
50 51 {% endif %}
51 52 </div>
52 53 {% autoescape off %}
53 54 {% if truncated %}
54 55 {{ post.text.rendered|truncatewords_html:50 }}
55 56 {% else %}
56 57 {{ post.text.rendered }}
57 58 {% endif %}
58 59 {% endautoescape %}
59 60 {% if post.is_referenced %}
60 61 <div class="refmap">
61 62 {% trans "Replies" %}:
62 63 {% for ref_post in post.get_sorted_referenced_posts %}
63 64 <a href="{% post_url ref_post.id %}">&gt;&gt;{{ ref_post.id }}</a
64 65 >{% if not forloop.last %},{% endif %}
65 66 {% endfor %}
66 67 </div>
67 68 {% endif %}
68 69 </div>
69 70 {% if post.is_opening and post.thread_new.tags.exists %}
70 71 <div class="metadata">
71 72 {% if post.is_opening and need_open_link %}
72 73 {{ post.thread_new.get_images_count }} {% trans 'images' %}.
73 74 {% endif %}
74 75 <span class="tags">
75 76 {% for tag in post.thread_new.get_tags %}
76 77 <a class="tag" href="{% url 'tag' tag.name %}">
77 78 #{{ tag.name }}</a>{% if not forloop.last %},{% endif %}
78 79 {% endfor %}
79 80 </span>
80 81 </div>
81 82 {% endif %}
82 83 </div>
83 84 {% endspaceless %}
85 {% cache 300 post post.id post.thread_new.last_edit_time truncated moderator LANGUAGE_CODE need_open_link %}
General Comments 0
You need to be logged in to leave comments. Login now