##// 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 1 {% load i18n %}
2 2 {% load board %}
3 3 {% load cache %}
4 4
5 5 {% get_current_language as LANGUAGE_CODE %}
6 6
7 7 {% if thread.archived %}
8 8 <div class="post archive_post" id="{{ post.id }}">
9 9 {% elif bumpable %}
10 10 <div class="post" id="{{ post.id }}">
11 11 {% else %}
12 12 <div class="post dead_post" id="{{ post.id }}">
13 13 {% endif %}
14 14
15 15 <div class="post-info">
16 16 <a class="post_id" href="{% post_object_url post thread=thread %}"
17 17 {% if not truncated and not thread.archived %}
18 18 onclick="javascript:addQuickReply('{{ post.id }}'); return false;"
19 19 title="{% trans 'Quote' %}" {% endif %}>({{ post.id }})</a>
20 20 <span class="title">{{ post.title }}</span>
21 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 27 {% if thread.archived %}
28 {% if is_opening %}
23 29 β€” {{ thread.bump_time }}
30 {% endif %}
24 31 {% endif %}
25 32 {% if is_opening and need_open_link %}
26 33 {% if thread.archived %}
27 34 [<a class="link" href="{% url 'thread' post.id %}">{% trans "Open" %}</a>]
28 35 {% else %}
29 36 [<a class="link" href="{% url 'thread' post.id %}#form">{% trans "Reply" %}</a>]
30 37 {% endif %}
31 38 {% endif %}
32 39
33 40 {% if moderator %}
34 41 <span class="moderator_info">
35 [<a href="{% url 'admin:boards_post_change' post.id %}"
36 >{% trans 'Edit' %}</a>]
42 [<a href="{% url 'admin:boards_post_change' post.id %}">{% trans 'Edit' %}</a>]
37 43 {% if is_opening %}
38 [<a href="{% url 'admin:boards_thread_change' thread.id %}"
39 >{% trans 'Edit thread' %}</a>]
44 [<a href="{% url 'admin:boards_thread_change' thread.id %}">{% trans 'Edit thread' %}</a>]
40 45 {% endif %}
41 46 </span>
42 47 {% endif %}
43 48 </div>
44 49 {% if post.images.exists %}
45 50 {% with post.images.all.0 as image %}
46 51 <div class="image">
47 52 <a
48 53 class="thumb"
49 54 href="{{ image.image.url }}"><img
50 55 src="{{ image.image.url_200x150 }}"
51 56 alt="{{ post.id }}"
52 57 width="{{ image.pre_width }}"
53 58 height="{{ image.pre_height }}"
54 59 data-width="{{ image.width }}"
55 60 data-height="{{ image.height }}"/>
56 61 </a>
57 62 </div>
58 63 {% endwith %}
59 64 {% endif %}
60 65 <div class="message">
61 66 {% autoescape off %}
62 67 {% if truncated %}
63 68 {{ post.get_text|truncatewords_html:50 }}
64 69 {% else %}
65 70 {{ post.get_text }}
66 71 {% endif %}
67 72 {% endautoescape %}
68 73 {% if post.is_referenced %}
69 74 <div class="refmap">
70 75 {% autoescape off %}
71 76 {% trans "Replies" %}: {{ post.refmap }}
72 77 {% endautoescape %}
73 78 </div>
74 79 {% endif %}
75 80 </div>
76 81 {% if is_opening %}
77 82 <div class="metadata">
78 83 {% if is_opening and need_open_link %}
79 84 {{ thread.get_reply_count }} {% trans 'messages' %},
80 85 {{ thread.get_images_count }} {% trans 'images' %}.
81 86 {% endif %}
82 87 <span class="tags">
83 88 {% for tag in thread.get_tags %}
84 89 {% autoescape off %}
85 90 {{ tag.get_view }}{% if not forloop.last %},{% endif %}
86 91 {% endautoescape %}
87 92 {% endfor %}
88 93 </span>
89 94 </div>
90 95 {% endif %}
91 96 </div>
General Comments 0
You need to be logged in to leave comments. Login now