posting_general.html
158 lines
| 5.7 KiB
| text/html
|
HtmlLexer
/ templates / posting_general.html
|
r9 | {% extends "base.html" %} | ||
|
r24 | {% load i18n %} | ||
|
r36 | {% load markup %} | ||
|
r24 | |||
|
r33 | {% block head %} | ||
|
r74 | {% if tag %} | ||
<title>Neboard - {{ tag }}</title> | ||||
{% else %} | ||||
<title>Neboard</title> | ||||
{% endif %} | ||||
|
r33 | {% endblock %} | ||
|
r9 | {% block content %} | ||
|
r74 | {% if tag %} | ||
<div class="tag_info"> | ||||
<h2>{{ tag }}</h2> | ||||
</div> | ||||
{% endif %} | ||||
|
r59 | {% if threads %} | ||
{% for thread in threads %} | ||||
<div class="thread"> | ||||
|
r46 | {% if thread.can_bump %} | ||
<div class="post"> | ||||
{% else %} | ||||
|
r59 | <div class="post dead_post"> | ||
|
r46 | {% endif %} | ||
|
r22 | {% if thread.image %} | ||
|
r39 | <div class="image"> | ||
|
r63 | <a class="fancy" | ||
href="{{ thread.image.url }}"><img | ||||
|
r22 | src="{{ thread.image.url_200x150 }}" /> | ||
</a> | ||||
</div> | ||||
{% endif %} | ||||
|
r39 | <div class="message"> | ||
|
r59 | <div class="post-info"> | ||
<span class="title">{{ thread.title }}</span> | ||||
<a class="post_id" href="{% url 'thread' thread.id %}"> | ||||
(#{{ thread.id }})</a> | ||||
[{{ thread.pub_time }}] | ||||
[<a class="link" href="{% url 'thread' thread.id %}#form" | ||||
>{% trans "Reply" %}</a>] | ||||
</div> | ||||
|
r39 | {% autoescape off %} | ||
|
r61 | {{ thread.text.rendered|truncatewords_html:50 }} | ||
|
r39 | {% endautoescape %} | ||
|
r32 | </div> | ||
|
r59 | <div class="metadata"> | ||
{{ thread.get_reply_count }} {% trans 'replies' %}, | ||||
{{ thread.get_images_count }} {% trans 'images' %}. | ||||
{% if thread.tags.all %} | ||||
<span class="tags">{% trans 'Tags' %}: | ||||
{% for tag in thread.tags.all %} | ||||
<a class="tag" href=" | ||||
{% url 'tag' tag_name=tag.name %}"> | ||||
{{ tag.name }}</a> | ||||
{% endfor %} | ||||
</span> | ||||
{% endif %} | ||||
</div> | ||||
</div> | ||||
{% if thread.get_last_replies %} | ||||
<div class="last-replies"> | ||||
{% for post in thread.get_last_replies %} | ||||
{% if thread.can_bump %} | ||||
<div class="post"> | ||||
{% else %} | ||||
<div class="post dead_post"> | ||||
{% endif %} | ||||
{% if post.image %} | ||||
<div class="image"> | ||||
|
r63 | <a class="fancy" | ||
href="{{ post.image.url }}"><img | ||||
|
r59 | src="{{ post.image.url_200x150 }}" /> | ||
</a> | ||||
</div> | ||||
{% endif %} | ||||
<div class="message"> | ||||
<div class="post-info"> | ||||
<span class="title">{{ post.title }}</span> | ||||
<a class="post_id" href=" | ||||
{% url 'thread' thread.id %}#{{ post.id }}"> | ||||
(#{{ post.id }})</a> | ||||
[{{ post.pub_time }}] | ||||
</div> | ||||
{% autoescape off %} | ||||
|
r61 | {{ post.text.rendered|truncatewords_html:50 }} | ||
|
r59 | {% endautoescape %} | ||
</div> | ||||
</div> | ||||
{% endfor %} | ||||
|
r30 | </div> | ||
|
r59 | {% endif %} | ||
</div> | ||||
|
r22 | {% endfor %} | ||
|
r59 | {% else %} | ||
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> | ||||
|
r75 | <div class="form-errors">{{ form.title.errors }}</div> | ||
|
r18 | </div> | ||
|
r36 | <div class="form-row"> | ||
<div class="form-label">{% trans 'Text' %}</div> | ||||
<div class="form-input">{{ form.text }}</div> | ||||
|
r75 | <div class="form-errors">{{ form.text.errors }}</div> | ||
|
r18 | </div> | ||
|
r36 | <div class="form-row"> | ||
<div class="form-label">{% trans 'Image' %}</div> | ||||
<div class="form-input">{{ form.image }}</div> | ||||
|
r75 | <div class="form-errors">{{ form.image.errors }}</div> | ||
|
r36 | </div> | ||
<div class="form-row"> | ||||
<div class="form-label">{% trans 'Tags' %}</div> | ||||
<div class="form-input">{{ form.tags }}</div> | ||||
|
r75 | <div class="form-errors">{{ form.tags.errors }}</div> | ||
|
r18 | </div> | ||
</div> | ||||
|
r36 | <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> | ||
|
r9 | |||
{% endblock %} | ||||
|
r44 | {% block metapanel %} | ||
<span class="metapanel"> | ||||
|
r60 | <b><a href="https://bitbucket.org/neko259/neboard/">Neboard</a> | ||
2013-05 (dev)</b> | ||||
|
r46 | {% 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> | ||
|
r74 | {% endblock %} | ||