58 lines
1.6 KiB
HTML
58 lines
1.6 KiB
HTML
{% extends "default.html" %}
|
|
{% block pagetitle %}{{name2}}{% endblock %}
|
|
{% block content %}
|
|
<h3 class="my-3" style="text-align: center">{{name2}}</h3>
|
|
<h5 class="font-weight-bold text-center mt-3">Total: {{total}}</h5>
|
|
<div class="mt-1 overflow-x-auto"><table class="table table-striped mb-5">
|
|
<thead class="bg-primary text-white">
|
|
<tr>
|
|
<th>#</th>
|
|
<th>Name</th>
|
|
<th>{{name}}votes</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody id="followers-table">
|
|
{% for user, num in users %}
|
|
<tr {% if v.id == user.id %}class="self"{% endif %}>
|
|
<td>{{loop.index+PAGE_SIZE*(page-1)}}</td>
|
|
<td>{% include "user_in_table.html" %}</td>
|
|
<td><a href="{{request.path}}/{{user.id}}/posts">{{num}}</a></td>
|
|
</tr>
|
|
{% endfor %}
|
|
{% if pos and (pos[0] > 25 or not pos[1]) %}
|
|
<tr style="border-top:2px solid var(--primary)">
|
|
<td>{{pos[0]}}</td>
|
|
<td>
|
|
{% with user=v %}
|
|
{% include "user_in_table.html" %}
|
|
{% endwith %}
|
|
</td>
|
|
<td><a href="{{request.path}}/{{v.id}}/posts">{{pos[1]}}</a></td>
|
|
</tr>
|
|
{% endif %}
|
|
</tbody>
|
|
</table>
|
|
|
|
{% endblock %}
|
|
|
|
{% block pagenav %}
|
|
<nav aria-label="Page navigation">
|
|
<ul class="pagination pagination-sm py-3 pl-3 mb-0">
|
|
{% if page>1 %}
|
|
<li class="page-item">
|
|
<small><a class="page-link" href="?page={{page-1}}" tabindex="-1">Prev</a></small>
|
|
</li>
|
|
{% else %}
|
|
<li class="page-item disabled"><span class="page-link">Prev</span></li>
|
|
{% endif %}
|
|
{% if next_exists %}
|
|
<li class="page-item">
|
|
<small><a class="page-link" href="?page={{page+1}}">Next</a></small>
|
|
</li>
|
|
{% else %}
|
|
<li class="page-item disabled"><span class="page-link">Next</span></li>
|
|
{% endif %}
|
|
</ul>
|
|
</nav>
|
|
{% endblock %}
|