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