posting_general.html
81 lines
| 2.9 KiB
| text/html
|
HtmlLexer
/ templates / posting_general.html
Ilyas
|
r9 | {% extends "base.html" %} | |
neko259
|
r24 | {% load i18n %} | |
neko259
|
r36 | {% load markup %} | |
neko259
|
r24 | ||
neko259
|
r33 | {% block head %} | |
<title>Neboard</title> | |||
{% endblock %} | |||
Ilyas
|
r9 | {% block content %} | |
Ilyas
|
r14 | {% if threads %} | |
{% for thread in threads %} | |||
neko259
|
r28 | <div class="post"> | |
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
|
r31 | [<a class="link" href="{% url 'thread' thread.id %}" | |
neko259
|
r36 | >{% trans "View" %}</a>] | |
neko259
|
r37 | {{ thread.get_parsed_text|markdown:"safe"|truncatechars:300 }} | |
neko259
|
r32 | </div> | |
neko259
|
r30 | <div class="metadata"> | |
neko259
|
r31 | {{ thread.get_reply_count }} {% trans 'replies' %}, | |
neko259
|
r30 | {{ thread.get_images_count }} {% trans 'images' %}, | |
neko259
|
r31 | {{ thread.get_gets_count }} {% trans 'gets' %}. | |
neko259
|
r30 | {% if thread.tags.all %} | |
<span class="tags">{% trans 'Tags' %}: | |||
{% for tag in thread.tags.all %} | |||
neko259
|
r31 | <a class="tag" href=" | |
{% url 'tag' tag_name=tag.name %}"> | |||
neko259
|
r30 | {{ tag.name }}</a> | |
{% endfor %} | |||
</span> | |||
{% endif %} | |||
</div> | |||
neko259
|
r22 | </div> | |
{% endfor %} | |||
Ilyas
|
r14 | {% else %} | |
neko259
|
r24 | No threads found. | |
neko259
|
r16 | <hr /> | |
Ilyas
|
r14 | {% endif %} | |
neko259
|
r36 | <form enctype="multipart/form-data" method="post">{% csrf_token %} | |
<div class="post-form-w"> | |||
<div class="form-title">{% trans "Create new thread" %}</div> | |||
<div class="post-form"> | |||
<div class="form-row"> | |||
<div class="form-label">{% trans 'Title' %}</div> | |||
<div class="form-input">{{ form.title }}</div> | |||
</div> | |||
<div class="form-row"> | |||
<div class="form-label">{% trans 'Text' %}</div> | |||
<div class="form-input">{{ form.text }}</div> | |||
</div> | |||
<div class="form-row"> | |||
<div class="form-label">{% trans 'Image' %}</div> | |||
<div class="form-input">{{ form.image }}</div> | |||
</div> | |||
<div class="form-row"> | |||
<div class="form-label">{% trans 'Tags' %}</div> | |||
<div class="form-input">{{ form.tags }}</div> | |||
</div> | |||
</div> | |||
<div class="form-submit"><input type="submit" | |||
value="{% trans "Post" %}"/></div> | |||
<div>Tags must be delimited by spaces. Text or image is required | |||
neko259
|
r28 | </div> | |
neko259
|
r36 | <div>Use <a | |
href="http://daringfireball.net/projects/markdown/basics"> | |||
markdown</a> syntax for posting.</div> | |||
neko259
|
r16 | </div> | |
neko259
|
r36 | </form> | |
Ilyas
|
r14 | ||
neko259
|
r22 | {% endblock %} |