thread.html
60 lines
| 2.1 KiB
| text/html
|
HtmlLexer
/ templates / thread.html
neko259
|
r20 | {% extends "base.html" %} | |
neko259
|
r24 | {% load i18n %} | |
neko259
|
r20 | {% block content %} | |
{% if posts %} | |||
{% for post in posts %} | |||
neko259
|
r30 | <a name="{{ post.id }}"></a> | |
neko259
|
r28 | <div class="post"> | |
neko259
|
r22 | {% if post.image %} | |
<div class="block"> | |||
<a href="{{ post.image.url }}"><img | |||
src="{{ post.image.url_200x150 }}" /> | |||
</a> | |||
</div> | |||
{% endif %} | |||
<div class="block"> | |||
<span class="title">{{ post.title }}</span> | |||
neko259
|
r30 | <a class="post_id" href="#{{ post.id }}"> | |
(#{{ post.id }})</a> | |||
neko259
|
r26 | [{{ post.pub_time }}]<br /> | |
neko259
|
r24 | {{ post.text }}<br /> | |
neko259
|
r30 | {% if post.tags.all %} | |
<div class="metadata"> | |||
<span class="tags">{% trans 'Tags' %}: | |||
{% for tag in post.tags.all %} | |||
<a class="tag" href="/tag/{{ tag.name }}"> | |||
{{ tag.name }}</a> | |||
{% endfor %} | |||
</span> | |||
</div> | |||
{% endif %} | |||
neko259
|
r22 | </div> | |
neko259
|
r28 | </div> | |
neko259
|
r20 | {% endfor %} | |
{% else %} | |||
No threads found. | |||
<hr /> | |||
{% endif %} | |||
<div class="post-form"> | |||
neko259
|
r28 | <span class="form-title">{% trans "Reply to the thread" %}</span> | |
<form enctype="multipart/form-data" method="post">{% csrf_token %} | |||
<div class="form-row"> | |||
<div class="form-input">{% trans 'Title' %}</div> | |||
<div class="form-input">{{ form.title }}</div> | |||
</div> | |||
<div class="form-row"> | |||
<div class="form-input">{% trans 'Text' %}</div> | |||
<div class="form-input">{{ form.text }}</div> | |||
</div> | |||
<div class="form-row"> | |||
<div class="form-input">{% trans 'Image' %}</div> | |||
<div class="form-input">{{ form.image }}</div> | |||
</div> | |||
<input type="submit" value="{% trans 'Post' %}" /> | |||
</form> | |||
neko259
|
r20 | </div> | |
neko259
|
r22 | {% endblock %} |