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