##// END OF EJS Templates
Show archived thread death time only for an opening post
neko259 -
r930:a02cd1c0 default
parent child Browse files
Show More
@@ -1,91 +1,96 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 {% if thread.archived %}
7 {% if thread.archived %}
8 <div class="post archive_post" id="{{ post.id }}">
8 <div class="post archive_post" id="{{ post.id }}">
9 {% elif bumpable %}
9 {% elif bumpable %}
10 <div class="post" id="{{ post.id }}">
10 <div class="post" id="{{ post.id }}">
11 {% else %}
11 {% else %}
12 <div class="post dead_post" id="{{ post.id }}">
12 <div class="post dead_post" id="{{ post.id }}">
13 {% endif %}
13 {% endif %}
14
14
15 <div class="post-info">
15 <div class="post-info">
16 <a class="post_id" href="{% post_object_url post thread=thread %}"
16 <a class="post_id" href="{% post_object_url post thread=thread %}"
17 {% if not truncated and not thread.archived %}
17 {% if not truncated and not thread.archived %}
18 onclick="javascript:addQuickReply('{{ post.id }}'); return false;"
18 onclick="javascript:addQuickReply('{{ post.id }}'); return false;"
19 title="{% trans 'Quote' %}" {% endif %}>({{ post.id }})</a>
19 title="{% trans 'Quote' %}" {% endif %}>({{ post.id }})</a>
20 <span class="title">{{ post.title }}</span>
20 <span class="title">{{ post.title }}</span>
21 <span class="pub_time">{{ post.pub_time }}</span>
21 <span class="pub_time">{{ post.pub_time }}</span>
22 {% comment %}
23 Thread death time needs to be shown only if the thread is alredy archived
24 and this is an opening post (thread death time) or a post for popup
25 (we don't see OP here so we show the death time in the post itself).
26 {% endcomment %}
22 {% if thread.archived %}
27 {% if thread.archived %}
28 {% if is_opening %}
23 β€” {{ thread.bump_time }}
29 β€” {{ thread.bump_time }}
30 {% endif %}
24 {% endif %}
31 {% endif %}
25 {% if is_opening and need_open_link %}
32 {% if is_opening and need_open_link %}
26 {% if thread.archived %}
33 {% if thread.archived %}
27 [<a class="link" href="{% url 'thread' post.id %}">{% trans "Open" %}</a>]
34 [<a class="link" href="{% url 'thread' post.id %}">{% trans "Open" %}</a>]
28 {% else %}
35 {% else %}
29 [<a class="link" href="{% url 'thread' post.id %}#form">{% trans "Reply" %}</a>]
36 [<a class="link" href="{% url 'thread' post.id %}#form">{% trans "Reply" %}</a>]
30 {% endif %}
37 {% endif %}
31 {% endif %}
38 {% endif %}
32
39
33 {% if moderator %}
40 {% if moderator %}
34 <span class="moderator_info">
41 <span class="moderator_info">
35 [<a href="{% url 'admin:boards_post_change' post.id %}"
42 [<a href="{% url 'admin:boards_post_change' post.id %}">{% trans 'Edit' %}</a>]
36 >{% trans 'Edit' %}</a>]
37 {% if is_opening %}
43 {% if is_opening %}
38 [<a href="{% url 'admin:boards_thread_change' thread.id %}"
44 [<a href="{% url 'admin:boards_thread_change' thread.id %}">{% trans 'Edit thread' %}</a>]
39 >{% trans 'Edit thread' %}</a>]
40 {% endif %}
45 {% endif %}
41 </span>
46 </span>
42 {% endif %}
47 {% endif %}
43 </div>
48 </div>
44 {% if post.images.exists %}
49 {% if post.images.exists %}
45 {% with post.images.all.0 as image %}
50 {% with post.images.all.0 as image %}
46 <div class="image">
51 <div class="image">
47 <a
52 <a
48 class="thumb"
53 class="thumb"
49 href="{{ image.image.url }}"><img
54 href="{{ image.image.url }}"><img
50 src="{{ image.image.url_200x150 }}"
55 src="{{ image.image.url_200x150 }}"
51 alt="{{ post.id }}"
56 alt="{{ post.id }}"
52 width="{{ image.pre_width }}"
57 width="{{ image.pre_width }}"
53 height="{{ image.pre_height }}"
58 height="{{ image.pre_height }}"
54 data-width="{{ image.width }}"
59 data-width="{{ image.width }}"
55 data-height="{{ image.height }}"/>
60 data-height="{{ image.height }}"/>
56 </a>
61 </a>
57 </div>
62 </div>
58 {% endwith %}
63 {% endwith %}
59 {% endif %}
64 {% endif %}
60 <div class="message">
65 <div class="message">
61 {% autoescape off %}
66 {% autoescape off %}
62 {% if truncated %}
67 {% if truncated %}
63 {{ post.get_text|truncatewords_html:50 }}
68 {{ post.get_text|truncatewords_html:50 }}
64 {% else %}
69 {% else %}
65 {{ post.get_text }}
70 {{ post.get_text }}
66 {% endif %}
71 {% endif %}
67 {% endautoescape %}
72 {% endautoescape %}
68 {% if post.is_referenced %}
73 {% if post.is_referenced %}
69 <div class="refmap">
74 <div class="refmap">
70 {% autoescape off %}
75 {% autoescape off %}
71 {% trans "Replies" %}: {{ post.refmap }}
76 {% trans "Replies" %}: {{ post.refmap }}
72 {% endautoescape %}
77 {% endautoescape %}
73 </div>
78 </div>
74 {% endif %}
79 {% endif %}
75 </div>
80 </div>
76 {% if is_opening %}
81 {% if is_opening %}
77 <div class="metadata">
82 <div class="metadata">
78 {% if is_opening and need_open_link %}
83 {% if is_opening and need_open_link %}
79 {{ thread.get_reply_count }} {% trans 'messages' %},
84 {{ thread.get_reply_count }} {% trans 'messages' %},
80 {{ thread.get_images_count }} {% trans 'images' %}.
85 {{ thread.get_images_count }} {% trans 'images' %}.
81 {% endif %}
86 {% endif %}
82 <span class="tags">
87 <span class="tags">
83 {% for tag in thread.get_tags %}
88 {% for tag in thread.get_tags %}
84 {% autoescape off %}
89 {% autoescape off %}
85 {{ tag.get_view }}{% if not forloop.last %},{% endif %}
90 {{ tag.get_view }}{% if not forloop.last %},{% endif %}
86 {% endautoescape %}
91 {% endautoescape %}
87 {% endfor %}
92 {% endfor %}
88 </span>
93 </span>
89 </div>
94 </div>
90 {% endif %}
95 {% endif %}
91 </div>
96 </div>
General Comments 0
You need to be logged in to leave comments. Login now