##// END OF EJS Templates
Fixed medadata design when an image is present. Added a method to determine if the tag is empty (has no attached threads).
Fixed medadata design when an image is present. Added a method to determine if the tag is empty (has no attached threads).

File last commit:

r32:e74f9cc7 default
r32:e74f9cc7 default
Show More
thread.html
60 lines | 2.1 KiB | text/html | HtmlLexer
{% extends "base.html" %}
{% load i18n %}
{% block content %}
{% if posts %}
{% for post in posts %}
<a name="{{ post.id }}"></a>
<div class="post">
{% if post.image %}
<div class="block">
<a href="{{ post.image.url }}"><img
src="{{ post.image.url_200x150 }}" />
</a>
</div>
{% endif %}
<div class="block">
<span class="title">{{ post.title }}</span>
<a class="post_id" href="#{{ post.id }}">
(#{{ post.id }})</a>
[{{ post.pub_time }}]<br />
{{ post.get_parsed_text|linebreaksbr }}<br />
</div>
{% if post.tags.all %}
<div class="metadata">
<span class="tags">{% trans 'Tags' %}:
{% for tag in post.tags.all %}
<a class="tag" href="{% url 'tag' tag.name %}">
{{ tag.name }}</a>
{% endfor %}
</span>
</div>
{% endif %}
</div>
{% endfor %}
{% else %}
No threads found.
<hr />
{% endif %}
<div class="post-form">
<span class="form-title">{% trans "Reply to the thread" %}</span>
<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>
<input type="submit" value="{% trans 'Post' %}" />
</form>
</div>
{% endblock %}