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