posting_general.html
60 lines
| 2.1 KiB
| text/html
|
HtmlLexer
/ templates / posting_general.html
|
r9 | {% extends "base.html" %} | |
|
r24 | {% load i18n %} | |
|
r9 | {% block content %} | |
|
r14 | {% if threads %} | |
{% for thread in threads %} | |||
|
r22 | {% if thread.image %} | |
<div class="block"> | |||
<a href="{{ thread.image.url }}"><img | |||
src="{{ thread.image.url_200x150 }}" /> | |||
</a> | |||
</div> | |||
{% endif %} | |||
<div class="block"> | |||
<span class="title">{{ thread.title }}</span> | |||
<a class="link" href="/thread/{{ thread.id }}/"> | |||
|
r24 | [{% trans "View" %}]</a><br /> | |
{{ thread.text }}<br /> | |||
{% if thread.tags %} | |||
<span class="tags">{% trans 'Tags' %}: | |||
{% for tag in thread.tags.all %} | |||
<a class="tag" href="/tag/{{ tag.name }}"> | |||
{{ tag.name }}</a> | |||
{% endfor %} | |||
</span> | |||
{% endif %} | |||
|
r22 | </div> | |
|
r16 | <hr /> | |
|
r22 | {% endfor %} | |
|
r14 | {% else %} | |
|
r24 | No threads found. | |
|
r16 | <hr /> | |
|
r14 | {% endif %} | |
|
r16 | <div class="post-form"> | |
|
r24 | <div class="post-form"> | |
<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> | |||
<div class="form-row"> | |||
<div class="form-input">{% trans 'Tags' %}</div> | |||
<div class="form-input">{{ form.tags }}</div> | |||
</div> | |||
<input type="submit" value="{% trans 'Post' %}" /> | |||
</form> | |||
</div> | |||
|
r16 | </div> | |
|
r14 | ||
|
r22 | {% endblock %} |