Show More
@@ -1,107 +1,107 b'' | |||||
1 | {% load i18n %} |
|
1 | {% load i18n %} | |
2 | {% load board %} |
|
2 | {% load board %} | |
3 |
|
3 | |||
4 | {% get_current_language as LANGUAGE_CODE %} |
|
4 | {% get_current_language as LANGUAGE_CODE %} | |
5 |
|
5 | |||
6 | <div class="{{ css_class }}" id="{{ post.id }}" data-uid="{{ post.uid }}" {% if tree_depth %}style="margin-left: {{ tree_depth }}em;"{% endif %}> |
|
6 | <div class="{{ css_class }}" id="{{ post.id }}" data-uid="{{ post.uid }}" {% if tree_depth %}style="margin-left: {{ tree_depth }}em;"{% endif %}> | |
7 | <div class="post-info"> |
|
7 | <div class="post-info"> | |
8 | <a class="post_id" href="{{ post.get_absolute_url }}">#{{ post.get_absolute_id }}</a> |
|
8 | <a class="post_id" href="{{ post.get_absolute_url }}">#{{ post.get_absolute_id }}</a> | |
9 | <span class="title">{{ post.title }}</span> |
|
9 | <span class="title">{{ post.title }}</span> | |
10 | <span class="pub_time"><time datetime="{{ post.pub_time|date:'c' }}">{{ post.pub_time }}</time></span> |
|
10 | <span class="pub_time"><time datetime="{{ post.pub_time|date:'c' }}">{{ post.pub_time }}</time></span> | |
11 | {% if post.tripcode %} |
|
11 | {% if post.tripcode %} | |
12 | / |
|
12 | / | |
13 | {% with tripcode=post.get_tripcode %} |
|
13 | {% with tripcode=post.get_tripcode %} | |
14 | <a href="{% url 'feed' %}?tripcode={{ tripcode.get_full_text }}" |
|
14 | <a href="{% url 'feed' %}?tripcode={{ tripcode.get_full_text }}" | |
15 | class="tripcode" title="{{ tripcode.get_full_text }}" |
|
15 | class="tripcode" title="{{ tripcode.get_full_text }}" | |
16 | style="border: solid 2px #{{ tripcode.get_color }}; border-left: solid 1ex #{{ tripcode.get_color }};">{{ tripcode.get_short_text }}</a> |
|
16 | style="border: solid 2px #{{ tripcode.get_color }}; border-left: solid 1ex #{{ tripcode.get_color }};">{{ tripcode.get_short_text }}</a> | |
17 | {% endwith %} |
|
17 | {% endwith %} | |
18 | {% endif %} |
|
18 | {% endif %} | |
19 | {% comment %} |
|
19 | {% comment %} | |
20 | Thread death time needs to be shown only if the thread is alredy archived |
|
20 | Thread death time needs to be shown only if the thread is alredy archived | |
21 | and this is an opening post (thread death time) or a post for popup |
|
21 | and this is an opening post (thread death time) or a post for popup | |
22 | (we don't see OP here so we show the death time in the post itself). |
|
22 | (we don't see OP here so we show the death time in the post itself). | |
23 | {% endcomment %} |
|
23 | {% endcomment %} | |
24 | {% if thread.is_archived %} |
|
24 | {% if thread.is_archived %} | |
25 | {% if is_opening %} |
|
25 | {% if is_opening %} | |
26 | β <time datetime="{{ thread.bump_time|date:'c' }}">{{ thread.bump_time }}</time> |
|
26 | β <time datetime="{{ thread.bump_time|date:'c' }}">{{ thread.bump_time }}</time> | |
27 | {% endif %} |
|
27 | {% endif %} | |
28 | {% endif %} |
|
28 | {% endif %} | |
29 | {% if is_opening %} |
|
29 | {% if is_opening %} | |
30 | {% if need_open_link %} |
|
30 | {% if need_open_link %} | |
31 | {% if thread.is_archived %} |
|
31 | {% if thread.is_archived %} | |
32 | <a class="link" href="{% url 'thread' post.id %}">{% trans "Open" %}</a> |
|
32 | <a class="link" href="{% url 'thread' post.id %}">{% trans "Open" %}</a> | |
33 | {% else %} |
|
33 | {% else %} | |
34 | <a class="link" href="{% url 'thread' post.id %}#form">{% trans "Reply" %}</a> |
|
34 | <a class="link" href="{% url 'thread' post.id %}#form">{% trans "Reply" %}</a> | |
35 | {% endif %} |
|
35 | {% endif %} | |
36 | {% endif %} |
|
36 | {% endif %} | |
37 | {% else %} |
|
37 | {% else %} | |
38 | {% if need_op_data %} |
|
38 | {% if need_op_data %} | |
39 | {% with thread.get_opening_post as op %} |
|
39 | {% with thread.get_opening_post as op %} | |
40 | {% trans " in " %}{{ op.get_link_view|safe }} <span class="title">{{ op.get_title_or_text }}</span> |
|
40 | {% trans " in " %}{{ op.get_link_view|safe }} <span class="title">{{ op.get_title_or_text }}</span> | |
41 | {% endwith %} |
|
41 | {% endwith %} | |
42 | {% endif %} |
|
42 | {% endif %} | |
43 | {% endif %} |
|
43 | {% endif %} | |
44 | {% if reply_link and not thread.is_archived %} |
|
44 | {% if reply_link and not thread.is_archived %} | |
45 | <a href="#form" onclick="addQuickReply('{{ post.id }}'); return false;">{% trans 'Reply' %}</a> |
|
45 | <a href="#form" onclick="addQuickReply('{{ post.id }}'); return false;">{% trans 'Reply' %}</a> | |
46 | {% endif %} |
|
46 | {% endif %} | |
47 |
|
47 | |||
48 | {% if perms.boards.change_post or perms.boards.delete_post or perms.boards.change_thread or perms_boards.delete_thread %} |
|
48 | {% if perms.boards.change_post or perms.boards.delete_post or perms.boards.change_thread or perms_boards.delete_thread %} | |
49 | <span class="moderator_info"> |
|
49 | <span class="moderator_info"> | |
50 | {% if perms.boards.change_post or perms.boards.delete_post %} |
|
50 | {% if perms.boards.change_post or perms.boards.delete_post %} | |
51 | | <a href="{% url 'admin:boards_post_change' post.id %}">{% trans 'Edit' %}</a> |
|
51 | | <a href="{% url 'admin:boards_post_change' post.id %}">{% trans 'Edit' %}</a> | |
52 | {% endif %} |
|
52 | {% endif %} | |
53 | {% if perms.boards.change_thread or perms_boards.delete_thread %} |
|
53 | {% if perms.boards.change_thread or perms_boards.delete_thread %} | |
54 | {% if is_opening %} |
|
54 | {% if is_opening %} | |
55 | | <a href="{% url 'admin:boards_thread_change' thread.id %}">{% trans 'Edit thread' %}</a> |
|
55 | | <a href="{% url 'admin:boards_thread_change' thread.id %}">{% trans 'Edit thread' %}</a> | |
56 | {% endif %} |
|
56 | {% endif %} | |
57 | {% endif %} |
|
57 | {% endif %} | |
58 | {% if post.global_id %} |
|
58 | {% if post.global_id_id %} | |
59 | | <a href="{% url 'post_sync_data' post.id %}">RAW</a> |
|
59 | | <a href="{% url 'post_sync_data' post.id %}">RAW</a> | |
60 | {% endif %} |
|
60 | {% endif %} | |
61 | </span> |
|
61 | </span> | |
62 | {% endif %} |
|
62 | {% endif %} | |
63 | </div> |
|
63 | </div> | |
64 | {% comment %} |
|
64 | {% comment %} | |
65 | Post images. Currently only 1 image can be posted and shown, but post model |
|
65 | Post images. Currently only 1 image can be posted and shown, but post model | |
66 | supports multiple. |
|
66 | supports multiple. | |
67 | {% endcomment %} |
|
67 | {% endcomment %} | |
68 | {% for image in post.images.all %} |
|
68 | {% for image in post.images.all %} | |
69 | {{ image.get_view|safe }} |
|
69 | {{ image.get_view|safe }} | |
70 | {% endfor %} |
|
70 | {% endfor %} | |
71 | {% for file in post.attachments.all %} |
|
71 | {% for file in post.attachments.all %} | |
72 | {{ file.get_view|safe }} |
|
72 | {{ file.get_view|safe }} | |
73 | {% endfor %} |
|
73 | {% endfor %} | |
74 | {% comment %} |
|
74 | {% comment %} | |
75 | Post message (text) |
|
75 | Post message (text) | |
76 | {% endcomment %} |
|
76 | {% endcomment %} | |
77 | <div class="message"> |
|
77 | <div class="message"> | |
78 | {% autoescape off %} |
|
78 | {% autoescape off %} | |
79 | {% if truncated %} |
|
79 | {% if truncated %} | |
80 | {{ post.get_text|truncatewords_html:50 }} |
|
80 | {{ post.get_text|truncatewords_html:50 }} | |
81 | {% else %} |
|
81 | {% else %} | |
82 | {{ post.get_text }} |
|
82 | {{ post.get_text }} | |
83 | {% endif %} |
|
83 | {% endif %} | |
84 | {% endautoescape %} |
|
84 | {% endautoescape %} | |
85 | </div> |
|
85 | </div> | |
86 | {% if post.is_referenced %} |
|
86 | {% if post.is_referenced %} | |
87 | {% if not mode_tree %} |
|
87 | {% if not mode_tree %} | |
88 | <div class="refmap"> |
|
88 | <div class="refmap"> | |
89 | {% trans "Replies" %}: {{ post.refmap|safe }} |
|
89 | {% trans "Replies" %}: {{ post.refmap|safe }} | |
90 | </div> |
|
90 | </div> | |
91 | {% endif %} |
|
91 | {% endif %} | |
92 | {% endif %} |
|
92 | {% endif %} | |
93 | {% comment %} |
|
93 | {% comment %} | |
94 | Thread metadata: counters, tags etc |
|
94 | Thread metadata: counters, tags etc | |
95 | {% endcomment %} |
|
95 | {% endcomment %} | |
96 | {% if is_opening %} |
|
96 | {% if is_opening %} | |
97 | <div class="metadata"> |
|
97 | <div class="metadata"> | |
98 | {% if is_opening and need_open_link %} |
|
98 | {% if is_opening and need_open_link %} | |
99 | {% blocktrans count count=thread.get_reply_count %}{{ count }} message{% plural %}{{ count }} messages{% endblocktrans %}, |
|
99 | {% blocktrans count count=thread.get_reply_count %}{{ count }} message{% plural %}{{ count }} messages{% endblocktrans %}, | |
100 | {% blocktrans count count=thread.get_images_count %}{{ count }} image{% plural %}{{ count }} images{% endblocktrans %}. |
|
100 | {% blocktrans count count=thread.get_images_count %}{{ count }} image{% plural %}{{ count }} images{% endblocktrans %}. | |
101 | {% endif %} |
|
101 | {% endif %} | |
102 | <span class="tags"> |
|
102 | <span class="tags"> | |
103 | {{ thread.get_tag_url_list|safe }} |
|
103 | {{ thread.get_tag_url_list|safe }} | |
104 | </span> |
|
104 | </span> | |
105 | </div> |
|
105 | </div> | |
106 | {% endif %} |
|
106 | {% endif %} | |
107 | </div> |
|
107 | </div> |
General Comments 0
You need to be logged in to leave comments.
Login now