##// END OF EJS Templates
Caching PPD by day, removed manual cache removal
Caching PPD by day, removed manual cache removal

File last commit:

r420:fbd9ed91 default
r424:f54bae30 default
Show More
thread.html
163 lines | 6.6 KiB | text/html | HtmlLexer
{% extends "boards/base.html" %}
{% load i18n %}
{% load cache %}
{% load static from staticfiles %}
{% load board %}
{% block head %}
<title>Neboard - {{ thread.get_replies.0.get_title }}</title>
{% endblock %}
{% block content %}
{% spaceless %}
{% get_current_language as LANGUAGE_CODE %}
<script src="{% static 'js/thread_update.js' %}"></script>
<script src="{% static 'js/thread.js' %}"></script>
{% cache 600 thread_view thread.id thread.last_edit_time moderator LANGUAGE_CODE %}
{% if bumpable %}
<div class="bar-bg">
<div class="bar-value" style="width:{{ bumplimit_progress }}%" id="bumplimit_progress">
</div>
<div class="bar-text">
<span id="left_to_limit">{{ posts_left }}</span> {% trans 'posts to bumplimit' %}
</div>
</div>
{% endif %}
<div class="thread">
{% for post in thread.get_replies %}
{% if bumpable %}
<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 }}"
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.id }}">
({{ post.id }})</a>
[{{ post.pub_time }}]
[<a href="#" onclick="javascript:addQuickReply('{{ post.id }}')
; return false;">&gt;&gt;</a>]
{% 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 %}
{{ post.text.rendered }}
{% 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 forloop.first %}
<div class="metadata">
<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>
{% endfor %}
</div>
{% endcache %}
<form id="form" enctype="multipart/form-data" method="post"
>{% csrf_token %}
<div class="post-form-w">
<div class="form-title">{% trans "Reply to thread" %} #{{ thread.get_opening_post.id }}</div>
<div class="post-form">
<div class="form-row">
<div class="form-label">{% trans 'Title' %}</div>
<div class="form-input">{{ form.title }}</div>
<div class="form-errors">{{ form.title.errors }}</div>
</div>
<div class="form-row">
<div class="form-label">{% trans 'Formatting' %}</div>
<div class="form-input" id="mark_panel">
<span class="mark_btn" id="quote"><span class="quote">&gt;{% trans 'quote' %}</span></span>
<span class="mark_btn" id="italic"><i>{% trans 'italic' %}</i></span>
<span class="mark_btn" id="bold"><b>{% trans 'bold' %}</b></span>
<span class="mark_btn" id="spoiler"><span class="spoiler">{% trans 'spoiler' %}</span></span>
<span class="mark_btn" id="comment"><span class="comment">// {% trans 'comment' %}</span></span>
</div>
</div>
<div class="form-row">
<div class="form-label">{% trans 'Text' %}</div>
<div class="form-input">{{ form.text }}</div>
<div class="form-errors">{{ form.text.errors }}</div>
</div>
<div class="form-row">
<div class="form-label">{% trans 'Image' %}</div>
<div class="form-input">{{ form.image }}</div>
<div class="form-errors">{{ form.image.errors }}</div>
</div>
<div class="form-row form-email">
<div class="form-label">{% trans 'e-mail' %}</div>
<div class="form-input">{{ form.email }}</div>
<div class="form-errors">{{ form.email.errors }}</div>
</div>
<div class="form-row">
{{ form.captcha }}
<div class="form-errors">{{ form.captcha.errors }}</div>
</div>
<div class="form-row">
<div class="form-errors">{{ form.other.errors }}</div>
</div>
</div>
<div class="form-submit"><input type="submit"
value="{% trans "Post" %}"/></div>
<div><a href="{% url "staticpage" name="help" %}">
{% trans 'Text syntax' %}</a></div>
</div>
</form>
{% endspaceless %}
{% endblock %}
{% block metapanel %}
{% get_current_language as LANGUAGE_CODE %}
<span class="metapanel" data-last-update="{{ last_update }}">
{% cache 600 thread_meta thread.last_edit_time moderator LANGUAGE_CODE %}
<span id="reply-count">{{ thread.get_reply_count }}</span> {% trans 'replies' %},
<span id="image-count">{{ thread.get_images_count }}</span> {% trans 'images' %}.
{% trans 'Last update: ' %}{{ thread.last_edit_time }}
[<a href="rss/">RSS</a>]
{% endcache %}
</span>
{% endblock %}