mirror of
https://github.com/ae-utbm/sith.git
synced 2026-03-31 07:49:39 +00:00
Add some pagination on forum topics
This commit is contained in:
@@ -38,7 +38,13 @@
|
||||
<p>{{ topic.description }}</p>
|
||||
<p><a href="{{ url('forum:new_message', topic_id=topic.id) }}">{% trans %}Reply{% endtrans %}</a></p>
|
||||
|
||||
{% for m in topic.messages.select_related('author__avatar_pict').all() %}
|
||||
<p style="text-align: right; background: #d8e7f3;">
|
||||
{% for p in range(1, page_count + 1) %}
|
||||
<span class="ib" style="background: {% if p == current_page %}white{% endif %}; margin: 0;"><a href="?page={{ p }}">{{ p }}</a></span>
|
||||
{% endfor %}
|
||||
</p>
|
||||
|
||||
{% for m in msgs %}
|
||||
{% if m.id == first_unread_message_id %}
|
||||
<span id="first_unread"></span>
|
||||
{% endif %}
|
||||
@@ -50,6 +56,12 @@
|
||||
{% endfor %}
|
||||
|
||||
<p><a href="{{ url('forum:new_message', topic_id=topic.id) }}">{% trans %}Reply{% endtrans %}</a></p>
|
||||
|
||||
<p style="text-align: right; background: #d8e7f3;">
|
||||
{% for p in range(1, page_count + 1) %}
|
||||
<span class="ib" style="background: {% if p == current_page %}white{% endif %}; margin: 0;"><a href="?page={{ p }}">{{ p }}</a></span>
|
||||
{% endfor %}
|
||||
</p>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user