##// END OF EJS Templates
Moved static page view to the class-based. Removed old methods from the view...
Moved static page view to the class-based. Removed old methods from the view module

File last commit:

r563:7e01fcf5 1.7-dev
r565:98476b33 1.7-dev
Show More
post.html
96 lines | 4.0 KiB | text/html | HtmlLexer
{% load i18n %}
{% load board %}
{% load cache %}
{% get_current_language as LANGUAGE_CODE %}
{% cache 600 post post.id post.thread_new.last_edit_time truncated moderator LANGUAGE_CODE need_open_link %}
{% spaceless %}
{% with thread=post.thread_new %}
{% if thread.archived %}
<div class="post archive_post" id="{{ post.id }}">
{% elif thread.can_bump %}
<div class="post" id="{{ post.id }}">
{% else %}
<div class="post dead_post" id="{{ post.id }}">
{% endif %}
{% if post.image %}
<div class="image">
<a
class="thumb"
href="{{ post.image.url }}"><img
src="{{ post.image.url_200x150 }}"
alt="{{ post.id }}"
width="{{ post.image_pre_width }}"
height="{{ post.image_pre_height }}"
data-width="{{ post.image_width }}"
data-height="{{ post.image_height }}"/>
</a>
</div>
{% endif %}
<div class="message">
<div class="post-info">
<span class="title">{{ post.title }}</span>
<a class="post_id" href="{% post_url post.id %}">
({{ post.id }}) </a>
[<span class="pub_time">{{ post.pub_time }}</span>]
{% if thread.archived %}
— [{{ thread.bump_time }}]
{% endif %}
{% if not truncated and not thread.archived%}
[<a href="#" onclick="javascript:addQuickReply('{{ post.id }}')
; return false;">&gt;&gt;</a>]
{% endif %}
{% if post.is_opening and need_open_link %}
{% if post.thread_new.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 'delete' post_id=post.id %}"
>{% trans 'Delete' %}</a>]
({{ post.poster_ip }})
[<a href="{% url 'ban' post_id=post.id %}?next={{ request.path }}"
>{% trans 'Ban IP' %}</a>]
</span>
{% endif %}
</div>
{% autoescape off %}
{% if truncated %}
{{ post.text.rendered|truncatewords_html:50 }}
{% else %}
{{ post.text.rendered }}
{% endif %}
{% endautoescape %}
{% if post.is_referenced %}
<div class="refmap">
{% trans "Replies" %}:
{% for ref_post in post.get_sorted_referenced_posts %}
<a href="{% post_url ref_post.id %}">&gt;&gt;{{ ref_post.id }}</a
>{% if not forloop.last %},{% endif %}
{% endfor %}
</div>
{% endif %}
</div>
{% if post.is_opening and thread.tags.exists %}
<div class="metadata">
{% if post.is_opening and need_open_link %}
{{ 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>
{% endif %}
</div>
{% endwith %}
{% endspaceless %}
{% endcache %}