##// END OF EJS Templates
Version bump
Version bump

File last commit:

r1694:ea97d140 default
r1698:bb195ee1 3.3.3 default
Show More
post.html
112 lines | 4.9 KiB | text/html | HtmlLexer
{% load i18n %}
{% load board %}
{% get_current_language as LANGUAGE_CODE %}
<div class="{{ css_class }}" id="{{ post.id }}" data-uid="{{ post.uid }}" {% 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>
<span class="title">{{ post.title }}</span>
{% if perms.boards.change_post and post.has_ip %}
<a href="{% url 'feed' %}?ip={{ post.poster_ip }}">*</a>
<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 %}
/
{% with tripcode=post.get_tripcode %}
<a href="{% url 'feed' %}?tripcode={{ tripcode.get_full_text }}"
class="tripcode" title="{{ tripcode.get_full_text }}"
style="border: solid 2px #{{ tripcode.get_color }}; border-left: solid 1ex #{{ tripcode.get_color }};">{{ tripcode.get_short_text }}</a>
{% endwith %}
{% 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 %}
{% if perms.boards.change_post or perms.boards.delete_post or perms.boards.change_thread or perms_boards.delete_thread %}
<span class="moderator_info">
{% if perms.boards.change_post or perms.boards.delete_post %}
| <a href="{% url 'admin:boards_post_change' post.id %}">{% trans 'Edit' %}</a>
{% endif %}
{% if perms.boards.change_thread or perms_boards.delete_thread %}
{% if is_opening %}
| <a href="{% url 'admin:boards_thread_change' thread.id %}">{% trans 'Edit thread' %}</a>
| <a href="{% url 'admin:boards_thread_delete' thread.id %}">{% trans 'Delete thread' %}</a>
{% else %}
| <a href="{% url 'admin:boards_post_delete' post.id %}">{% trans 'Delete post' %}</a>
{% endif %}
{% endif %}
{% if post.global_id_id %}
| <a href="{% url 'post_sync_data' post.id %}">RAW</a>
{% endif %}
</span>
{% endif %}
</div>
{% comment %}
Post images. Currently only 1 image can be posted and shown, but post model
supports multiple.
{% endcomment %}
{% for image in post.images.all %}
{{ image.get_view|safe }}
{% endfor %}
{% 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|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_images_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>