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