forum: fix reply page

Signed-off-by: Skia <skia@libskia.so>
This commit is contained in:
Skia 2017-06-02 08:47:47 +02:00
parent 38622c98e9
commit 3521ad699e

View File

@ -19,18 +19,19 @@
> <a href="{{ topic.forum.get_absolute_url() }}">{{ topic.forum }}</a> > <a href="{{ topic.forum.get_absolute_url() }}">{{ topic.forum }}</a>
> <a href="{{ topic.get_absolute_url() }}">{{ topic }}</a> > <a href="{{ topic.get_absolute_url() }}">{{ topic }}</a>
</p> </p>
<h3>{{ topic.title }}</h3> <div id="forum">
<h4>{% trans %}Reply{% endtrans %}</h4> <h3>{{ topic.title }}</h3>
{% else %} <h4>{% trans %}Reply{% endtrans %}</h4>
<h4>{% trans %}New topic{% endtrans %}</h4> {% else %}
{% endif %} <h4>{% trans %}New topic{% endtrans %}</h4>
<form action="" method="post" enctype="multipart/form-data"> {% endif %}
<form action="" method="post" enctype="multipart/form-data">
{% csrf_token %} {% csrf_token %}
{{ form.as_p() }} {{ form.as_p() }}
<p><input type="button" value="{% trans %}Preview{% endtrans %}" onclick="javascript:make_preview();" /></p> <p><input type="button" value="{% trans %}Preview{% endtrans %}" onclick="javascript:make_preview();" /></p>
<p><input type="submit" value="{% trans %}Save{% endtrans %}" /></p> <p><input type="submit" value="{% trans %}Save{% endtrans %}" /></p>
</form> </form>
<div id="preview_message" class="message" style="display: none;"> <div id="preview_message" class="message" style="display: none;">
<div class="msg_author"> <div class="msg_author">
{% if user.avatar_pict %} {% if user.avatar_pict %}
<img src="{{ user.avatar_pict.get_download_url() }}" alt="{% trans %}Profile{% endtrans %}" id="picture" /> <img src="{{ user.avatar_pict.get_download_url() }}" alt="{% trans %}Profile{% endtrans %}" id="picture" />
@ -45,15 +46,18 @@
<div id="preview" class="ib w_big"></div> <div id="preview" class="ib w_big"></div>
<div class="forum_signature">{{ user.forum_signature|markdown }}</div> <div class="forum_signature">{{ user.forum_signature|markdown }}</div>
</div> </div>
</div> </div>
<hr> <hr>
{% if topic %} {% if topic %}
{% for m in topic.messages.select_related('author__avatar_pict').order_by('-id')[:10] %} {% for m in topic.messages.select_related('author__avatar_pict').order_by('-id')[:10] %}
{{ display_message(m, user) }} {{ display_message(m, user) }}
{% endfor %} {% endfor %}
{% endif %} {% endif %}
</div>
{% endblock %} {% endblock %}