Improve forum style and templates

This commit is contained in:
Skia
2017-01-21 12:28:32 +01:00
parent ff77df3646
commit 93f5096140
7 changed files with 98 additions and 49 deletions

View File

@@ -33,13 +33,32 @@
<p>{{ topic.description }}</p>
<p><a href="{{ url('forum:new_message', topic_id=topic.id) }}">Reply</a></p>
{% for m in topic.messages.all() %}
<hr>
<div>
<h5>{{ m.title }}</h5>
<p><strong>{{ user_profile_link(m.author) }}</strong> - {{ m.date|date(DATETIME_FORMAT) }}
{{ m.date|time(DATETIME_FORMAT) }} -
<a href="{{ url('forum:new_message', topic_id=topic.id) }}?quote_id={{ m.id }}">Reply as quote</a></p>
<p>{{ m.message|markdown }}</p>
<div class="message">
<div class="msg_author">
{% if m.author.profile_pict %}
<img src="{{ m.author.profile_pict.get_download_url() }}" alt="{% trans %}Profile{% endtrans %}" id="picture" />
{% else %}
<img src="{{ static('core/img/unknown.jpg') }}" alt="{% trans %}Profile{% endtrans %}" id="picture" />
{% endif %}
<strong>{{ user_profile_link(m.author) }}</strong>
</div>
<div style="display: inline-block; width: 80%;">
<div style="display: inline-block; width: 74%;">
{% if m.title %}
<h5>{{ m.title }}</h5>
<hr>
{% endif %}
</div>
<div style="display: inline-block; width: 25%;">
<span> <a href="{{ url('forum:edit_message', message_id=m.id) }}">{% trans %}Edit{% endtrans %}</a></span>
<span><a href="{{ url('forum:new_message', topic_id=topic.id) }}?quote_id={{ m.id }}">
{% trans %}Reply as quote{% endtrans %}</a></span><br/>
<span>{{ m.date|date(DATETIME_FORMAT) }} {{ m.date|time(DATETIME_FORMAT) }}</span>
</div>
<div>
{{ m.message|markdown }}
</div>
</div>
</div>
{% endfor %}
{% endblock %}