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