Show More
@@ -1,88 +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 %} |
|
5 | {% get_current_language as LANGUAGE_CODE %} | |
6 |
|
6 | |||
7 | <div class="{{ css_class }}" id="{{ post.id }}"> |
|
7 | <div class="{{ css_class }}" id="{{ post.id }}"> | |
8 | <div class="post-info"> |
|
8 | <div class="post-info"> | |
9 | <a class="post_id" href="{{ post.get_url }}">({{ post.get_absolute_id }})</a> |
|
9 | <a class="post_id" href="{{ post.get_url }}">({{ post.get_absolute_id }})</a> | |
10 | <span class="title">{{ post.title }}</span> |
|
10 | <span class="title">{{ post.title }}</span> | |
11 |
<span class="pub_time"><time datetime="{{ post.pub_time|date:'c' }}">{{ post.pub_time |
|
11 | <span class="pub_time"><time datetime="{{ post.pub_time|date:'c' }}">{{ post.pub_time }}</time></span> | |
12 | {% comment %} |
|
12 | {% comment %} | |
13 | Thread death time needs to be shown only if the thread is alredy archived |
|
13 | Thread death time needs to be shown only if the thread is alredy archived | |
14 | and this is an opening post (thread death time) or a post for popup |
|
14 | and this is an opening post (thread death time) or a post for popup | |
15 | (we don't see OP here so we show the death time in the post itself). |
|
15 | (we don't see OP here so we show the death time in the post itself). | |
16 | {% endcomment %} |
|
16 | {% endcomment %} | |
17 | {% if thread.archived %} |
|
17 | {% if thread.archived %} | |
18 | {% if is_opening %} |
|
18 | {% if is_opening %} | |
19 |
β <time datetime="{{ thread.bump_time|date:'c' }}">{{ thread.bump_time |
|
19 | β <time datetime="{{ thread.bump_time|date:'c' }}">{{ thread.bump_time }}</time> | |
20 | {% endif %} |
|
20 | {% endif %} | |
21 | {% endif %} |
|
21 | {% endif %} | |
22 | {% if is_opening and need_open_link %} |
|
22 | {% if is_opening and need_open_link %} | |
23 | {% if thread.archived %} |
|
23 | {% if thread.archived %} | |
24 | <a class="link" href="{% url 'thread' post.id %}">{% trans "Open" %}</a> |
|
24 | <a class="link" href="{% url 'thread' post.id %}">{% trans "Open" %}</a> | |
25 | {% else %} |
|
25 | {% else %} | |
26 | <a class="link" href="{% url 'thread' post.id %}#form">{% trans "Reply" %}</a> |
|
26 | <a class="link" href="{% url 'thread' post.id %}#form">{% trans "Reply" %}</a> | |
27 | {% endif %} |
|
27 | {% endif %} | |
28 | {% endif %} |
|
28 | {% endif %} | |
29 | {% if reply_link and not thread.archived %} |
|
29 | {% if reply_link and not thread.archived %} | |
30 | <a href="#form" onclick="addQuickReply('{{ post.id }}'); return false;">{% trans 'Reply' %}</a> |
|
30 | <a href="#form" onclick="addQuickReply('{{ post.id }}'); return false;">{% trans 'Reply' %}</a> | |
31 | {% endif %} |
|
31 | {% endif %} | |
32 |
|
32 | |||
33 | {% if moderator %} |
|
33 | {% if moderator %} | |
34 | <span class="moderator_info"> |
|
34 | <span class="moderator_info"> | |
35 | <a href="{% url 'admin:boards_post_change' post.id %}">{% trans 'Edit' %}</a> |
|
35 | <a href="{% url 'admin:boards_post_change' post.id %}">{% trans 'Edit' %}</a> | |
36 | {% if is_opening %} |
|
36 | {% if is_opening %} | |
37 | | <a href="{% url 'admin:boards_thread_change' thread.id %}">{% trans 'Edit thread' %}</a> |
|
37 | | <a href="{% url 'admin:boards_thread_change' thread.id %}">{% trans 'Edit thread' %}</a> | |
38 | {% endif %} |
|
38 | {% endif %} | |
39 | </span> |
|
39 | </span> | |
40 | {% endif %} |
|
40 | {% endif %} | |
41 | </div> |
|
41 | </div> | |
42 | {% comment %} |
|
42 | {% comment %} | |
43 | Post images. Currently only 1 image can be posted and shown, but post model |
|
43 | Post images. Currently only 1 image can be posted and shown, but post model | |
44 | supports multiple. |
|
44 | supports multiple. | |
45 | {% endcomment %} |
|
45 | {% endcomment %} | |
46 | {% if post.images.exists %} |
|
46 | {% if post.images.exists %} | |
47 | {% with post.images.all.0 as image %} |
|
47 | {% with post.images.all.0 as image %} | |
48 | {% autoescape off %} |
|
48 | {% autoescape off %} | |
49 | {{ image.get_view }} |
|
49 | {{ image.get_view }} | |
50 | {% endautoescape %} |
|
50 | {% endautoescape %} | |
51 | {% endwith %} |
|
51 | {% endwith %} | |
52 | {% endif %} |
|
52 | {% endif %} | |
53 | {% comment %} |
|
53 | {% comment %} | |
54 | Post message (text) |
|
54 | Post message (text) | |
55 | {% endcomment %} |
|
55 | {% endcomment %} | |
56 | <div class="message"> |
|
56 | <div class="message"> | |
57 | {% autoescape off %} |
|
57 | {% autoescape off %} | |
58 | {% if truncated %} |
|
58 | {% if truncated %} | |
59 | {{ post.get_text|truncatewords_html:50 }} |
|
59 | {{ post.get_text|truncatewords_html:50 }} | |
60 | {% else %} |
|
60 | {% else %} | |
61 | {{ post.get_text }} |
|
61 | {{ post.get_text }} | |
62 | {% endif %} |
|
62 | {% endif %} | |
63 | {% endautoescape %} |
|
63 | {% endautoescape %} | |
64 | {% if post.is_referenced %} |
|
64 | {% if post.is_referenced %} | |
65 | <div class="refmap"> |
|
65 | <div class="refmap"> | |
66 | {% autoescape off %} |
|
66 | {% autoescape off %} | |
67 | {% trans "Replies" %}: {{ post.refmap }} |
|
67 | {% trans "Replies" %}: {{ post.refmap }} | |
68 | {% endautoescape %} |
|
68 | {% endautoescape %} | |
69 | </div> |
|
69 | </div> | |
70 | {% endif %} |
|
70 | {% endif %} | |
71 | </div> |
|
71 | </div> | |
72 | {% comment %} |
|
72 | {% comment %} | |
73 | Thread metadata: counters, tags etc |
|
73 | Thread metadata: counters, tags etc | |
74 | {% endcomment %} |
|
74 | {% endcomment %} | |
75 | {% if is_opening %} |
|
75 | {% if is_opening %} | |
76 | <div class="metadata"> |
|
76 | <div class="metadata"> | |
77 | {% if is_opening and need_open_link %} |
|
77 | {% if is_opening and need_open_link %} | |
78 | {{ thread.get_reply_count }} {% trans 'messages' %}, |
|
78 | {{ thread.get_reply_count }} {% trans 'messages' %}, | |
79 | {{ thread.get_images_count }} {% trans 'images' %}. |
|
79 | {{ thread.get_images_count }} {% trans 'images' %}. | |
80 | {% endif %} |
|
80 | {% endif %} | |
81 | <span class="tags"> |
|
81 | <span class="tags"> | |
82 | {% autoescape off %} |
|
82 | {% autoescape off %} | |
83 | {{ thread.get_tag_url_list }} |
|
83 | {{ thread.get_tag_url_list }} | |
84 | {% endautoescape %} |
|
84 | {% endautoescape %} | |
85 | </span> |
|
85 | </span> | |
86 | </div> |
|
86 | </div> | |
87 | {% endif %} |
|
87 | {% endif %} | |
88 | </div> |
|
88 | </div> |
@@ -1,38 +1,38 b'' | |||||
1 | {% extends "boards/base.html" %} |
|
1 | {% extends "boards/base.html" %} | |
2 |
|
2 | |||
3 | {% load i18n %} |
|
3 | {% load i18n %} | |
4 | {% load cache %} |
|
4 | {% load cache %} | |
5 | {% load static from staticfiles %} |
|
5 | {% load static from staticfiles %} | |
6 | {% load board %} |
|
6 | {% load board %} | |
7 | {% load tz %} |
|
7 | {% load tz %} | |
8 |
|
8 | |||
9 | {% block head %} |
|
9 | {% block head %} | |
10 | <title>{{ opening_post.get_title|striptags|truncatewords:10 }} |
|
10 | <title>{{ opening_post.get_title|striptags|truncatewords:10 }} | |
11 | - {{ site_name }}</title> |
|
11 | - {{ site_name }}</title> | |
12 | {% endblock %} |
|
12 | {% endblock %} | |
13 |
|
13 | |||
14 | {% block metapanel %} |
|
14 | {% block metapanel %} | |
15 |
|
15 | |||
16 | {% get_current_language as LANGUAGE_CODE %} |
|
16 | {% get_current_language as LANGUAGE_CODE %} | |
17 | {% get_current_timezone as TIME_ZONE %} |
|
17 | {% get_current_timezone as TIME_ZONE %} | |
18 |
|
18 | |||
19 | <span class="metapanel" |
|
19 | <span class="metapanel" | |
20 | data-last-update="{{ last_update }}" |
|
20 | data-last-update="{{ last_update }}" | |
21 | data-ws-token-time="{{ ws_token_time }}" |
|
21 | data-ws-token-time="{{ ws_token_time }}" | |
22 | data-ws-token="{{ ws_token }}" |
|
22 | data-ws-token="{{ ws_token }}" | |
23 | data-ws-project="{{ ws_project }}" |
|
23 | data-ws-project="{{ ws_project }}" | |
24 | data-ws-host="{{ ws_host }}" |
|
24 | data-ws-host="{{ ws_host }}" | |
25 | data-ws-port="{{ ws_port }}"> |
|
25 | data-ws-port="{{ ws_port }}"> | |
26 |
|
26 | |||
27 | {% block thread_meta_panel %} |
|
27 | {% block thread_meta_panel %} | |
28 | {% endblock %} |
|
28 | {% endblock %} | |
29 |
|
29 | |||
30 | {% cache 600 thread_meta thread.last_edit_time moderator LANGUAGE_CODE TIME_ZONE %} |
|
30 | {% cache 600 thread_meta thread.last_edit_time moderator LANGUAGE_CODE TIME_ZONE %} | |
31 | <span id="reply-count">{{ thread.get_reply_count }}</span>{% if thread.has_post_limit %}/{{ thread.max_posts }}{% endif %} {% trans 'messages' %}, |
|
31 | <span id="reply-count">{{ thread.get_reply_count }}</span>{% if thread.has_post_limit %}/{{ thread.max_posts }}{% endif %} {% trans 'messages' %}, | |
32 | <span id="image-count">{{ thread.get_images_count }}</span> {% trans 'images' %}. |
|
32 | <span id="image-count">{{ thread.get_images_count }}</span> {% trans 'images' %}. | |
33 |
{% trans 'Last update: ' %}<span id="last-update"><time datetime="{{ thread.last_edit_time|date:'c' }}">{{ thread.last_edit_time |
|
33 | {% trans 'Last update: ' %}<span id="last-update"><time datetime="{{ thread.last_edit_time|date:'c' }}">{{ thread.last_edit_time }}</time></span> | |
34 | [<a href="rss/">RSS</a>] |
|
34 | [<a href="rss/">RSS</a>] | |
35 | {% endcache %} |
|
35 | {% endcache %} | |
36 | </span> |
|
36 | </span> | |
37 |
|
37 | |||
38 | {% endblock %} |
|
38 | {% endblock %} |
General Comments 0
You need to be logged in to leave comments.
Login now