##// END OF EJS Templates
Compatibility with django 2.1
Compatibility with django 2.1

File last commit:

r2080:cc998817 default
r2128:90fde64a default
Show More
post.html
96 lines | 3.7 KiB | text/html | HtmlLexer
{% load i18n %}
{% load board %}
{% get_current_language as LANGUAGE_CODE %}
{% autoescape off %}
<div class="{{ css_class }}" id="{{ post.id }}"
data-uid="{{ post.uid }}"
data-has-global-id="{{ post.has_global_id }}"
data-thread-id="{{ thread.id }}"
data-opening="{{ is_opening }}"
{% if tree_depth %}style="margin-left: {{ tree_depth }}em;"{% endif %}>
<div class="post-info">
<a class="post_id" href="{{ post.get_absolute_url }}">#{{ post.id }}</a>
{% if is_opening %}
{% if thread.is_stickerpack %}
<span title="{% trans "Sticker Pack" %}">&#128247;</span>
{% elif thread.is_monochrome %}
<span title="{% trans "Monochrome" %}">&#9775;</span>
{% endif %}
{% endif %}
<span class="title">{{ post.title|escape }}</span>
{% if perms.boards.change_post and post.has_ip %}
<span class="pub_time" style="border-bottom: solid 2px #{{ post.get_ip_color }};" title="{{ post.poster_ip }}">
{% else %}
<span class="pub_time">
{% endif %}
<time datetime="{{ post.pub_time|date:'c' }}">{{ post.pub_time }}</time></span>
{% if post.tripcode %}
/ {{ post.get_tripcode.get_view|safe }}
{% endif %}
{% comment %}
Thread death time needs to be shown only if the thread is alredy archived
and this is an opening post (thread death time) or a post for popup
(we don't see OP here so we show the death time in the post itself).
{% endcomment %}
{% if is_opening and thread.is_archived %}
<time datetime="{{ thread.bump_time|date:'c' }}">{{ thread.bump_time }}</time>
{% endif %}
{% if is_opening %}
{% if need_open_link %}
{% if thread.is_archived %}
<a class="link" href="{% url 'thread' post.id %}">{% trans "Open" %}</a>
{% else %}
<a class="link" href="{% url 'thread' post.id %}#form">{% trans "Reply" %}</a>
{% endif %}
{% endif %}
{% else %}
{% if need_op_data %}
{% with thread.get_opening_post as op %}
{% trans " in " %}{{ op.get_link_view|safe }} <span class="title">{{ op.get_title_or_text }}</span>
{% endwith %}
{% endif %}
{% endif %}
{% if reply_link and not thread.is_archived %}
<a href="#form" onclick="addQuickReply('{{ post.id }}'); return false;">{% trans 'Reply' %}</a>
{% endif %}
<a class="post-menu" href="#">&#8942;</a>
</div>
{% for file in post.attachments.all %}
{{ file.get_view|safe }}
{% endfor %}
{% comment %}
Post message (text)
{% endcomment %}
<div class="message">
{% if truncated %}
{{ post.get_text|truncatewords_html:50|truncatenewlines_html:3|safe }}
{% else %}
{{ post.get_text|safe }}
{% endif %}
</div>
{% if post.is_referenced and not mode_tree %}
<div class="refmap">
{% trans "Replies" %}: {{ post.refmap|safe }}
</div>
{% endif %}
{% comment %}
Thread metadata: counters, tags etc
{% endcomment %}
{% if is_opening %}
<div class="metadata">
{% if need_open_link %}
♥ {{ thread.get_reply_count }}
❄ {{ thread.get_attachment_count }}
<a href="{% url 'thread_gallery' post.id %}">G</a>
<a href="{% url 'thread_tree' post.id %}">T</a>
{% endif %}
<span class="tags">
{{ thread.get_tag_url_list|safe }}
</span>
</div>
{% endif %}
</div>
{% endautoescape %}