Show More
@@ -1,98 +1,99 b'' | |||||
1 | {% load i18n %} |
|
1 | {% load i18n %} | |
2 | {% load board %} |
|
2 | {% load board %} | |
3 | {% load cache %} |
|
3 | {% load cache %} | |
4 |
|
4 | |||
5 | {% get_current_language as LANGUAGE_CODE %} |
|
5 | {% get_current_language as LANGUAGE_CODE %} | |
6 |
|
6 | |||
7 | {% spaceless %} |
|
7 | {% spaceless %} | |
8 | {% cache 600 post post.id post.last_edit_time thread.archived bumpable truncated moderator LANGUAGE_CODE need_open_link %} |
|
8 | {% cache 600 post post.id post.last_edit_time thread.archived bumpable truncated moderator LANGUAGE_CODE need_open_link %} | |
9 | {% if thread.archived %} |
|
9 | {% if thread.archived %} | |
10 | <div class="post archive_post" id="{{ post.id }}"> |
|
10 | <div class="post archive_post" id="{{ post.id }}"> | |
11 | {% elif bumpable %} |
|
11 | {% elif bumpable %} | |
12 | <div class="post" id="{{ post.id }}"> |
|
12 | <div class="post" id="{{ post.id }}"> | |
13 | {% else %} |
|
13 | {% else %} | |
14 | <div class="post dead_post" id="{{ post.id }}"> |
|
14 | <div class="post dead_post" id="{{ post.id }}"> | |
15 | {% endif %} |
|
15 | {% endif %} | |
16 |
|
16 | |||
17 | <div class="post-info"> |
|
17 | <div class="post-info"> | |
18 | <a class="post_id" href="{% post_object_url post thread=thread %}" |
|
18 | <a class="post_id" href="{% post_object_url post thread=thread %}" | |
19 | {% if not truncated and not thread.archived %} |
|
19 | {% if not truncated and not thread.archived %} | |
20 | onclick="javascript:addQuickReply('{{ post.id }}'); return false;" |
|
20 | onclick="javascript:addQuickReply('{{ post.id }}'); return false;" | |
21 | title="{% trans 'Quote' %}" |
|
21 | title="{% trans 'Quote' %}" | |
22 | {% endif %} |
|
22 | {% endif %} | |
23 | >({{ post.id }}) </a> |
|
23 | >({{ post.id }}) </a> | |
24 | <span class="title">{{ post.title }} </span> |
|
24 | <span class="title">{{ post.title }} </span> | |
25 | <span class="pub_time">{{ post.pub_time }}</span> |
|
25 | <span class="pub_time">{{ post.pub_time }}</span> | |
26 | {% if thread.archived %} |
|
26 | {% if thread.archived %} | |
27 | β {{ thread.bump_time }} |
|
27 | β {{ thread.bump_time }} | |
28 | {% endif %} |
|
28 | {% endif %} | |
29 | {% if is_opening and need_open_link %} |
|
29 | {% if is_opening and need_open_link %} | |
30 | {% if thread.archived %} |
|
30 | {% if thread.archived %} | |
31 | [<a class="link" href="{% url 'thread' post.id %}">{% trans "Open" %}</a>] |
|
31 | [<a class="link" href="{% url 'thread' post.id %}">{% trans "Open" %}</a>] | |
32 | {% else %} |
|
32 | {% else %} | |
33 | [<a class="link" href="{% url 'thread' post.id %}#form">{% trans "Reply" %}</a>] |
|
33 | [<a class="link" href="{% url 'thread' post.id %}#form">{% trans "Reply" %}</a>] | |
34 | {% endif %} |
|
34 | {% endif %} | |
35 | {% endif %} |
|
35 | {% endif %} | |
36 |
|
36 | |||
37 | {% if moderator %} |
|
37 | {% if moderator %} | |
38 | <span class="moderator_info"> |
|
38 | <span class="moderator_info"> | |
39 | [<a href="{% url 'post_admin' post_id=post.id %}" |
|
39 | [<a href="{% url 'post_admin' post_id=post.id %}" | |
40 | >{% trans 'Edit' %}</a>] |
|
40 | >{% trans 'Edit' %}</a>] | |
41 | [<a href="{% url 'delete' post_id=post.id %}" |
|
41 | [<a href="{% url 'delete' post_id=post.id %}" | |
42 | >{% trans 'Delete' %}</a>] |
|
42 | >{% trans 'Delete' %}</a>] | |
43 | ({{ post.poster_ip }}) |
|
43 | ({{ post.poster_ip }}) | |
44 | [<a href="{% url 'ban' post_id=post.id %}?next={{ request.path }}" |
|
44 | [<a href="{% url 'ban' post_id=post.id %}?next={{ request.path }}" | |
45 | >{% trans 'Ban IP' %}</a>] |
|
45 | >{% trans 'Ban IP' %}</a>] | |
46 | </span> |
|
46 | </span> | |
47 | {% endif %} |
|
47 | {% endif %} | |
48 | </div> |
|
48 | </div> | |
49 | {% if post.images.exists %} |
|
49 | {% if post.images.exists %} | |
50 | {% with post.images.all.0 as image %} |
|
50 | {% with post.images.all.0 as image %} | |
51 | <div class="image"> |
|
51 | <div class="image"> | |
52 | <a |
|
52 | <a | |
53 | class="thumb" |
|
53 | class="thumb" | |
54 | href="{{ image.image.url }}"><img |
|
54 | href="{{ image.image.url }}"><img | |
55 | src="{{ image.image.url_200x150 }}" |
|
55 | src="{{ image.image.url_200x150 }}" | |
56 | alt="{{ post.id }}" |
|
56 | alt="{{ post.id }}" | |
57 | width="{{ image.pre_width }}" |
|
57 | width="{{ image.pre_width }}" | |
58 | height="{{ image.pre_height }}" |
|
58 | height="{{ image.pre_height }}" | |
59 | data-width="{{ image.width }}" |
|
59 | data-width="{{ image.width }}" | |
60 | data-height="{{ image.height }}"/> |
|
60 | data-height="{{ image.height }}"/> | |
61 | </a> |
|
61 | </a> | |
62 | </div> |
|
62 | </div> | |
63 | {% endwith %} |
|
63 | {% endwith %} | |
64 | {% endif %} |
|
64 | {% endif %} | |
65 | <div class="message"> |
|
65 | <div class="message"> | |
66 | {% autoescape off %} |
|
66 | {% autoescape off %} | |
67 | {% if truncated %} |
|
67 | {% if truncated %} | |
68 | {{ post.text.rendered|truncatewords_html:50 }} |
|
68 | {{ post.text.rendered|truncatewords_html:50 }} | |
69 | {% else %} |
|
69 | {% else %} | |
70 | {{ post.text.rendered }} |
|
70 | {{ post.text.rendered }} | |
71 | {% endif %} |
|
71 | {% endif %} | |
72 | {% endautoescape %} |
|
72 | {% endautoescape %} | |
73 | {% if post.is_referenced %} |
|
73 | {% if post.is_referenced %} | |
74 | <div class="refmap"> |
|
74 | <div class="refmap"> | |
75 | {% autoescape off %} |
|
75 | {% autoescape off %} | |
76 | {% trans "Replies" %}: {{ post.refmap }} |
|
76 | {% trans "Replies" %}: {{ post.refmap }} | |
77 | {% endautoescape %} |
|
77 | {% endautoescape %} | |
78 | </div> |
|
78 | </div> | |
79 | {% endif %} |
|
79 | {% endif %} | |
80 | </div> |
|
80 | </div> | |
81 | {% endcache %} |
|
81 | {% endcache %} | |
82 | {% if is_opening %} |
|
82 | {% if is_opening %} | |
83 | {% cache 600 post_thread thread.id thread.last_edit_time LANGUAGE_CODE need_open_link %} |
|
83 | {% cache 600 post_thread thread.id thread.last_edit_time LANGUAGE_CODE need_open_link %} | |
84 | <div class="metadata"> |
|
84 | <div class="metadata"> | |
85 | {% if is_opening and need_open_link %} |
|
85 | {% if is_opening and need_open_link %} | |
|
86 | {{ thread.get_reply_count }} {% trans 'replies' %}, | |||
86 | {{ thread.get_images_count }} {% trans 'images' %}. |
|
87 | {{ thread.get_images_count }} {% trans 'images' %}. | |
87 | {% endif %} |
|
88 | {% endif %} | |
88 | <span class="tags"> |
|
89 | <span class="tags"> | |
89 | {% for tag in thread.get_tags %} |
|
90 | {% for tag in thread.get_tags %} | |
90 | <a class="tag" href="{% url 'tag' tag.name %}"> |
|
91 | <a class="tag" href="{% url 'tag' tag.name %}"> | |
91 | #{{ tag.name }}</a>{% if not forloop.last %},{% endif %} |
|
92 | #{{ tag.name }}</a>{% if not forloop.last %},{% endif %} | |
92 | {% endfor %} |
|
93 | {% endfor %} | |
93 | </span> |
|
94 | </span> | |
94 | </div> |
|
95 | </div> | |
95 | {% endcache %} |
|
96 | {% endcache %} | |
96 | {% endif %} |
|
97 | {% endif %} | |
97 | </div> |
|
98 | </div> | |
98 | {% endspaceless %} |
|
99 | {% endspaceless %} |
General Comments 0
You need to be logged in to leave comments.
Login now