##// END OF EJS Templates
Removed django-markupfield as it is incompatible with the new migrations. Use 2 fields for storing raw and rendered text and work with them directly
Removed django-markupfield as it is incompatible with the new migrations. Use 2 fields for storing raw and rendered text and work with them directly

File last commit:

r881:35b56a08 default
r881:35b56a08 default
Show More
post.html
96 lines | 3.8 KiB | text/html | HtmlLexer
{% load i18n %}
{% load board %}
{% load cache %}
{% get_current_language as LANGUAGE_CODE %}
{% spaceless %}
{% cache 600 post post.id post.last_edit_time thread.archived bumpable truncated moderator LANGUAGE_CODE need_open_link %}
{% 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.id }}) </a>
<span class="title">{{ post.title }} </span>
<span class="pub_time">{{ post.pub_time }}</span>
{% if thread.archived %}
— {{ thread.bump_time }}
{% 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>]
[<a href="{% url 'admin:boards_thread_change' thread.id %}"
>{% trans 'Edit thread' %}</a>]
</span>
{% endif %}
</div>
{% if post.images.exists %}
{% with post.images.all.0 as image %}
<div class="image">
<a
class="thumb"
href="{{ image.image.url }}"><img
src="{{ image.image.url_200x150 }}"
alt="{{ post.id }}"
width="{{ image.pre_width }}"
height="{{ image.pre_height }}"
data-width="{{ image.width }}"
data-height="{{ image.height }}"/>
</a>
</div>
{% endwith %}
{% endif %}
<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>
{% endcache %}
{% if is_opening %}
{% cache 600 post_thread thread.id thread.last_edit_time LANGUAGE_CODE need_open_link %}
<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 %}
<a class="tag" href="{% url 'tag' tag.name %}">
#{{ tag.name }}</a>{% if not forloop.last %},{% endif %}
{% endfor %}
</span>
</div>
{% endcache %}
{% endif %}
</div>
{% endspaceless %}