##// END OF EJS Templates
Show thread title in the post feed
neko259 -
r1169:a9a3b028 default
parent child Browse files
Show More
@@ -1,95 +1,95 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 }}">
6 <div class="{{ css_class }}" id="{{ post.id }}" data-uid="{{ post.uid }}">
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 {% comment %}
11 {% comment %}
12 Thread death time needs to be shown only if the thread is alredy archived
12 Thread death time needs to be shown only if the thread is alredy archived
13 and this is an opening post (thread death time) or a post for popup
13 and this is an opening post (thread death time) or a post for popup
14 (we don't see OP here so we show the death time in the post itself).
14 (we don't see OP here so we show the death time in the post itself).
15 {% endcomment %}
15 {% endcomment %}
16 {% if thread.archived %}
16 {% if thread.archived %}
17 {% if is_opening %}
17 {% if is_opening %}
18 β€” <time datetime="{{ thread.bump_time|date:'c' }}">{{ thread.bump_time }}</time>
18 β€” <time datetime="{{ thread.bump_time|date:'c' }}">{{ thread.bump_time }}</time>
19 {% endif %}
19 {% endif %}
20 {% endif %}
20 {% endif %}
21 {% if is_opening %}
21 {% if is_opening %}
22 {% if need_open_link %}
22 {% if 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 {% else %}
29 {% else %}
30 {% if need_op_data %}
30 {% if need_op_data %}
31 {% with thread.get_opening_post as op %}
31 {% with thread.get_opening_post as op %}
32 {% trans " in " %}<a href="{{ op.get_absolute_url }}">&gt;&gt;{{ op.id }}</a>
32 {% trans " in " %}<a href="{{ op.get_absolute_url }}">&gt;&gt;{{ op.id }}</a> <span class="title">{{ op.get_title|striptags|truncatewords:5 }}</span>
33 {% endwith %}
33 {% endwith %}
34 {% endif %}
34 {% endif %}
35 {% endif %}
35 {% endif %}
36 {% if reply_link and not thread.archived %}
36 {% if reply_link and not thread.archived %}
37 <a href="#form" onclick="addQuickReply('{{ post.id }}'); return false;">{% trans 'Reply' %}</a>
37 <a href="#form" onclick="addQuickReply('{{ post.id }}'); return false;">{% trans 'Reply' %}</a>
38 {% endif %}
38 {% endif %}
39
39
40 {% if moderator %}
40 {% if moderator %}
41 <span class="moderator_info">
41 <span class="moderator_info">
42 <a href="{% url 'admin:boards_post_change' post.id %}">{% trans 'Edit' %}</a>
42 <a href="{% url 'admin:boards_post_change' post.id %}">{% trans 'Edit' %}</a>
43 {% if is_opening %}
43 {% if is_opening %}
44 | <a href="{% url 'admin:boards_thread_change' thread.id %}">{% trans 'Edit thread' %}</a>
44 | <a href="{% url 'admin:boards_thread_change' thread.id %}">{% trans 'Edit thread' %}</a>
45 {% endif %}
45 {% endif %}
46 </span>
46 </span>
47 {% endif %}
47 {% endif %}
48 </div>
48 </div>
49 {% comment %}
49 {% comment %}
50 Post images. Currently only 1 image can be posted and shown, but post model
50 Post images. Currently only 1 image can be posted and shown, but post model
51 supports multiple.
51 supports multiple.
52 {% endcomment %}
52 {% endcomment %}
53 {% if post.images.exists %}
53 {% if post.images.exists %}
54 {% with post.images.all.0 as image %}
54 {% with post.images.all.0 as image %}
55 {% autoescape off %}
55 {% autoescape off %}
56 {{ image.get_view }}
56 {{ image.get_view }}
57 {% endautoescape %}
57 {% endautoescape %}
58 {% endwith %}
58 {% endwith %}
59 {% endif %}
59 {% endif %}
60 {% comment %}
60 {% comment %}
61 Post message (text)
61 Post message (text)
62 {% endcomment %}
62 {% endcomment %}
63 <div class="message">
63 <div class="message">
64 {% autoescape off %}
64 {% autoescape off %}
65 {% if truncated %}
65 {% if truncated %}
66 {{ post.get_text|truncatewords_html:50 }}
66 {{ post.get_text|truncatewords_html:50 }}
67 {% else %}
67 {% else %}
68 {{ post.get_text }}
68 {{ post.get_text }}
69 {% endif %}
69 {% endif %}
70 {% endautoescape %}
70 {% endautoescape %}
71 {% if post.is_referenced %}
71 {% if post.is_referenced %}
72 <div class="refmap">
72 <div class="refmap">
73 {% autoescape off %}
73 {% autoescape off %}
74 {% trans "Replies" %}: {{ post.refmap }}
74 {% trans "Replies" %}: {{ post.refmap }}
75 {% endautoescape %}
75 {% endautoescape %}
76 </div>
76 </div>
77 {% endif %}
77 {% endif %}
78 </div>
78 </div>
79 {% comment %}
79 {% comment %}
80 Thread metadata: counters, tags etc
80 Thread metadata: counters, tags etc
81 {% endcomment %}
81 {% endcomment %}
82 {% if is_opening %}
82 {% if is_opening %}
83 <div class="metadata">
83 <div class="metadata">
84 {% if is_opening and need_open_link %}
84 {% if is_opening and need_open_link %}
85 {{ thread.get_reply_count }} {% trans 'messages' %},
85 {{ thread.get_reply_count }} {% trans 'messages' %},
86 {{ thread.get_images_count }} {% trans 'images' %}.
86 {{ thread.get_images_count }} {% trans 'images' %}.
87 {% endif %}
87 {% endif %}
88 <span class="tags">
88 <span class="tags">
89 {% autoescape off %}
89 {% autoescape off %}
90 {{ thread.get_tag_url_list }}
90 {{ thread.get_tag_url_list }}
91 {% endautoescape %}
91 {% endautoescape %}
92 </span>
92 </span>
93 </div>
93 </div>
94 {% endif %}
94 {% endif %}
95 </div>
95 </div>
General Comments 0
You need to be logged in to leave comments. Login now