posting_general.html
106 lines
| 3.6 KiB
| text/html
|
HtmlLexer
/ templates / posting_general.html
|
r9 | {% extends "base.html" %} | |
|
r24 | {% load i18n %} | |
|
r36 | {% load markup %} | |
|
r24 | ||
|
r33 | {% block head %} | |
<title>Neboard</title> | |||
{% endblock %} | |||
|
r9 | {% block content %} | |
|
r14 | {% if threads %} | |
{% for thread in threads %} | |||
|
r46 | {% if thread.can_bump %} | |
<div class="post"> | |||
{% else %} | |||
<div class="dead_post"> | |||
{% endif %} | |||
|
r22 | {% if thread.image %} | |
|
r39 | <div class="image"> | |
|
r22 | <a href="{{ thread.image.url }}"><img | |
src="{{ thread.image.url_200x150 }}" /> | |||
</a> | |||
</div> | |||
{% endif %} | |||
|
r39 | <div class="message"> | |
|
r22 | <span class="title">{{ thread.title }}</span> | |
|
r44 | <a class="post_id" href="{% url 'thread' thread.id %}"> | |
(#{{ thread.id }})</a> | |||
|
r26 | [{{ thread.pub_time }}] | |
|
r45 | [<a class="link" href="{% url 'thread' thread.id %}#form" | |
>{% trans "Reply" %}</a>] | |||
|
r39 | {% autoescape off %} | |
{{ thread.text.rendered|truncatechars:300 }} | |||
{% endautoescape %} | |||
|
r32 | </div> | |
|
r30 | <div class="metadata"> | |
|
r31 | {{ thread.get_reply_count }} {% trans 'replies' %}, | |
|
r30 | {{ thread.get_images_count }} {% trans 'images' %}, | |
|
r31 | {{ thread.get_gets_count }} {% trans 'gets' %}. | |
|
r30 | {% if thread.tags.all %} | |
<span class="tags">{% trans 'Tags' %}: | |||
{% for tag in thread.tags.all %} | |||
|
r31 | <a class="tag" href=" | |
{% url 'tag' tag_name=tag.name %}"> | |||
|
r30 | {{ tag.name }}</a> | |
{% endfor %} | |||
</span> | |||
{% endif %} | |||
</div> | |||
|
r22 | </div> | |
{% endfor %} | |||
|
r14 | {% else %} | |
|
r24 | No threads found. | |
|
r16 | <hr /> | |
|
r14 | {% endif %} | |
|
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 | |||
|
r28 | </div> | |
|
r36 | <div>Use <a | |
href="http://daringfireball.net/projects/markdown/basics"> | |||
markdown</a> syntax for posting.</div> | |||
|
r16 | </div> | |
|
r36 | </form> | |
|
r14 | ||
|
r44 | {% endblock %} | |
{% block metapanel %} | |||
<span class="metapanel"> | |||
|
r46 | <b>Neboard 2013-05 (dev)</b> | |
{% trans "Pages:" %} | |||
{% for page in pages %} | |||
[<a href=" | |||
{% if tag %} | |||
{% url "tag" tag_name=tag page=page %} | |||
{% else %} | |||
{% url "index" page=page %} | |||
{% endif %} | |||
">{{ page }}</a>] | |||
{% endfor %} | |||
|
r44 | </span> | |
|
r22 | {% endblock %} |