thread.html
104 lines
| 3.7 KiB
| text/html
|
HtmlLexer
/ templates / thread.html
|
r20 | {% extends "base.html" %} | |
|
r24 | {% load i18n %} | |
|
r36 | {% load markup %} | |
|
r24 | ||
|
r33 | {% block head %} | |
|
r44 | <title>Neboard - {{ posts.0.title }}</title> | |
|
r33 | {% endblock %} | |
|
r20 | {% block content %} | |
|
r66 | <script src="{{ STATIC_URL }}js/thread.js"></script> | |
|
r20 | ||
{% if posts %} | |||
|
r66 | <div id="posts"> | |
|
r20 | {% for post in posts %} | |
|
r59 | {% if posts.0.can_bump %} | |
<div class="post" id="{{ post.id }}"> | |||
{% else %} | |||
<div class="post dead_post" id="{{ post.id }}"> | |||
{% endif %} | |||
|
r22 | {% if post.image %} | |
|
r41 | <div class="image"> | |
|
r63 | <a | |
class="fancy" | |||
href="{{ post.image.url }}"><img | |||
|
r22 | src="{{ post.image.url_200x150 }}" /> | |
</a> | |||
</div> | |||
{% endif %} | |||
|
r41 | <div class="message"> | |
|
r59 | <div class="post-info"> | |
<span class="title">{{ post.title }}</span> | |||
<a class="post_id" href="#{{ post.id }}"> | |||
(#{{ post.id }})</a> | |||
[{{ post.pub_time }}] | |||
{% if post.is_get %} | |||
<span class="get"> | |||
{% trans "Get!" %} | |||
</span> | |||
{% endif %} | |||
</div> | |||
|
r39 | {% autoescape off %} | |
{{ post.text.rendered }} | |||
{% endautoescape %} | |||
|
r22 | </div> | |
|
r32 | {% 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 %} | |||
|
r28 | </div> | |
|
r20 | {% endfor %} | |
|
r66 | </div> | |
|
r20 | {% else %} | |
|
r66 | No thread found. | |
|
r20 | <hr /> | |
{% endif %} | |||
|
r45 | <form id="form" enctype="multipart/form-data" method="post" | |
>{% csrf_token %} | |||
|
r36 | <div class="post-form-w"> | |
|
r38 | <div class="form-title">{% trans "Reply to thread" %}</div> | |
|
r36 | <div class="post-form"> | |
<div class="form-row"> | |||
<div class="form-label">{% trans 'Title' %}</div> | |||
<div class="form-input">{{ form.title }}</div> | |||
|
r75 | <div class="form-errors">{{ form.title.errors }}</div> | |
|
r36 | </div> | |
<div class="form-row"> | |||
<div class="form-label">{% trans 'Text' %}</div> | |||
<div class="form-input">{{ form.text }}</div> | |||
|
r75 | <div class="form-errors">{{ form.text.errors }}</div> | |
|
r36 | </div> | |
<div class="form-row"> | |||
<div class="form-label">{% trans 'Image' %}</div> | |||
<div class="form-input">{{ form.image }}</div> | |||
|
r75 | <div class="form-errors">{{ form.image.errors }}</div> | |
|
r36 | </div> | |
|
r28 | </div> | |
|
r36 | <div class="form-submit"><input type="submit" | |
value="{% trans "Post" %}"/></div> | |||
<div>Use <a | |||
href="http://daringfireball.net/projects/markdown/basics"> | |||
markdown</a> syntax for posting.</div> | |||
<div>Example: *<i>italic</i>*, **<b>bold</b>**</div> | |||
<div>Insert quotes with ">"</div> | |||
</div> | |||
</form> | |||
|
r20 | ||
|
r38 | {% endblock %} | |
|
r44 | ||
{% block metapanel %} | |||
<span class="metapanel"> | |||
{{ posts.0.get_reply_count }} {% trans 'replies' %}, | |||
|
r57 | {{ posts.0.get_images_count }} {% trans 'images' %}. | |
{% trans 'Last update: ' %}{{ posts.0.last_edit_time }} | |||
|
r44 | </span> | |
{% endblock %} |