##// END OF EJS Templates
Made tag name field unique. Added index to "required" field for tag
Made tag name field unique. Added index to "required" field for tag

File last commit:

r981:70eb4558 default
r983:c3e4aa3e default
Show More
post.html
97 lines | 3.1 KiB | text/html | HtmlLexer
{% load i18n %}
{% load board %}
{% load cache %}
{% get_current_language as LANGUAGE_CODE %}
{% if thread.archived %}
<div class="post archive_post" id="{{ post.id }}">
{% elif bumpable %}
<div class="post" id="{{ post.id }}">
{% else %}
<div class="post dead_post" id="{{ post.id }}">
{% endif %}
<div class="post-info">
<a class="post_id" href="{% post_object_url post thread=thread %}"
{% if not truncated and not thread.archived %}
onclick="javascript:addQuickReply('{{ post.id }}'); return false;"
title="{% trans 'Quote' %}" {% endif %}>({{ post.get_absolute_id }})</a>
<span class="title">{{ post.title }}</span>
<span class="pub_time">{{ post.pub_time }}</span>
{% 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 thread.archived %}
{% if is_opening %}
— {{ thread.bump_time }}
{% endif %}
{% endif %}
{% if is_opening and need_open_link %}
{% if thread.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 %}
{% if moderator %}
<span class="moderator_info">
[<a href="{% url 'admin:boards_post_change' post.id %}">{% trans 'Edit' %}</a>]
{% if is_opening %}
[<a href="{% url 'admin:boards_thread_change' thread.id %}">{% trans 'Edit thread' %}</a>]
{% endif %}
</span>
{% endif %}
</div>
{% comment %}
Post images. Currently only 1 image can be posted and shown, but post model
supports multiple.
{% endcomment %}
{% if post.images.exists %}
{% with post.images.all.0 as image %}
{% autoescape off %}
{{ image.get_view }}
{% endautoescape %}
{% endwith %}
{% endif %}
{% comment %}
Post message (text)
{% endcomment %}
<div class="message">
{% autoescape off %}
{% if truncated %}
{{ post.get_text|truncatewords_html:50 }}
{% else %}
{{ post.get_text }}
{% endif %}
{% endautoescape %}
{% if post.is_referenced %}
<div class="refmap">
{% autoescape off %}
{% trans "Replies" %}: {{ post.refmap }}
{% endautoescape %}
</div>
{% endif %}
</div>
{% comment %}
Thread metadata: counters, tags etc
{% endcomment %}
{% if is_opening %}
<div class="metadata">
{% if is_opening and need_open_link %}
{{ thread.get_reply_count }} {% trans 'messages' %},
{{ thread.get_images_count }} {% trans 'images' %}.
{% endif %}
<span class="tags">
{% for tag in thread.get_tags %}
{% autoescape off %}
{{ tag.get_view }}{% if not forloop.last %},{% endif %}
{% endautoescape %}
{% endfor %}
</span>
</div>
{% endif %}
</div>