##// END OF EJS Templates
Added 'ban' button to the moderator panel.
Added 'ban' button to the moderator panel.

File last commit:

r156:cf2ed04f default
r156:cf2ed04f default
Show More
thread.html
118 lines | 4.5 KiB | text/html | HtmlLexer
{% extends "boards/base.html" %}
{% load i18n %}
{% load markup %}
{% block head %}
<title>Neboard - {{ posts.0.get_title }}</title>
<script src="{{ STATIC_URL }}js/thread.js"></script>
{% endblock %}
{% block content %}
{% if posts %}
<div id="posts">
{% for post in posts %}
{% if posts.0.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="fancy"
href="{{ post.image.url }}"><img
src="{{ post.image.url_200x150 }}"
alt="{% trans 'Post image' %}"v
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 user.is_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 %}
</div>
{% if post.tags.all %}
<div class="metadata">
<span class="tags">{% trans 'Tags' %}:
{% for tag in post.tags.all %}
<a class="tag" href="{% url 'tag' tag.name %}">
{{ tag.name }}</a>
{% endfor %}
</span>
</div>
{% endif %}
</div>
{% endfor %}
</div>
{% endif %}
<form id="form" enctype="multipart/form-data" method="post"
>{% csrf_token %}
<div class="post-form-w">
<div class="form-title">{% trans "Reply to thread" %} #{{ posts.0.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 '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.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>
{% endblock %}
{% block metapanel %}
<span class="metapanel">
{{ posts.0.get_reply_count }} {% trans 'replies' %},
{{ posts.0.get_images_count }} {% trans 'images' %}.
{% trans 'Last update: ' %}{{ posts.0.last_edit_time }}
[<a href="rss/">RSS</a>]
</span>
{% endblock %}