posting_general.html
62 lines
| 2.2 KiB
| text/html
|
HtmlLexer
/ templates / posting_general.html
Ilyas
|
r9 | {% extends "base.html" %} | |
neko259
|
r24 | {% load i18n %} | |
Ilyas
|
r9 | {% block content %} | |
Ilyas
|
r14 | {% if threads %} | |
{% for thread in threads %} | |||
neko259
|
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> | |||
neko259
|
r26 | <span class="post_id">(#{{ thread.id }})</span> | |
[{{ thread.pub_time }}] | |||
neko259
|
r22 | <a class="link" href="/thread/{{ thread.id }}/"> | |
neko259
|
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 %} | |||
neko259
|
r22 | </div> | |
neko259
|
r16 | <hr /> | |
neko259
|
r22 | {% endfor %} | |
Ilyas
|
r14 | {% else %} | |
neko259
|
r24 | No threads found. | |
neko259
|
r16 | <hr /> | |
Ilyas
|
r14 | {% endif %} | |
neko259
|
r16 | <div class="post-form"> | |
neko259
|
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> | |||
neko259
|
r16 | </div> | |
Ilyas
|
r14 | ||
neko259
|
r22 | {% endblock %} |