thread.html
53 lines
| 1.7 KiB
| text/html
|
HtmlLexer
/ templates / thread.html
|
r20 | {% extends "base.html" %} | |
|
r24 | {% load i18n %} | |
|
r20 | {% block content %} | |
{% if posts %} | |||
{% for post in posts %} | |||
|
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> | |||
<span class="post_id">(#{{ post.id }})</span><br /> | |||
|
r24 | {{ post.text }}<br /> | |
{% if post.tags %} | |||
<span class="tags">{% trans 'Tags' %}: | |||
{% for tag in post.tags.all %} | |||
<a class="tag" href="/tag/{{ tag.name }}"> | |||
{{ tag.name }}</a> | |||
{% endfor %} | |||
</span> | |||
{% endif %} | |||
|
r22 | </div> | |
|
r20 | <hr /> | |
{% endfor %} | |||
{% else %} | |||
No threads found. | |||
<hr /> | |||
{% endif %} | |||
<div class="post-form"> | |||
|
r22 | <form enctype="multipart/form-data" method="post">{% csrf_token %} | |
|
r24 | <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' %}" /> | |||
|
r20 | </form> | |
</div> | |||
|
r22 | {% endblock %} |