NDOJ/templates/contest/contests_summary.html

78 lines
1.9 KiB
HTML
Raw Normal View History

2023-10-06 08:54:37 +00:00
{% extends "base.html" %}
{% block title_row %}{% endblock %}
{% block title_ruler %}{% endblock %}
{% block media %}
<style>
table {
width: 100%;
border-collapse: collapse;
border: 1px solid #ddd;
font-size: 1em;
}
th, td {
padding: 12px 15px;
border: 1px solid #595656;
padding: 15px;
text-align: center;
}
th {
font-size: 15px;
}
tr:hover {
cursor: pointer;
}
</style>
{% endblock %}
{% block body %}
<table class="table" id="users-table">
<thead>
<tr>
<th>{{_('Rank')}}</th>
<th>{{_('Name')}}</th>
{% for contest in contests %}
<th><a href="{{url('contest_view', contest.key)}}" title="{{contest.name}}">{{ loop.index }}</a></th>
{% endfor %}
<th>{{_('Points')}}</th>
</tr>
</thead>
<tbody>
2023-11-24 05:16:01 +00:00
{% for rank, item in page_obj %}
2023-10-06 08:54:37 +00:00
<tr>
<td>
{{ rank }}
</td>
<td>
<div>
<a href="{{url('user_page', item.username)}}"> <span class="username {{ item.css_class }} wrapline">{{item.username}}</span></a>
2023-10-06 08:54:37 +00:00
</div>
<div>{{item.first_name}}</div>
<div>{{item.last_name}}</div>
2023-10-06 08:54:37 +00:00
</td>
{% for point_contest, rank_contest in item.point_contests %}
<td>
<div>{{ point_contest }}</div>
{% if rank_contest %}
<div><small>(#{{ rank_contest }})</small></div>
{% endif %}
</td>
{% endfor %}
<td>
<b>{{ item.points }}</b>
</td>
</tr>
{% endfor %}
</tbody>
</table>
2023-11-24 05:16:01 +00:00
{% if page_obj and page_obj.num_pages > 1 %}
<div style="margin-top: 10px;">
{% include "list-pages.html" %}
</div>
{% endif %}
2023-10-06 08:54:37 +00:00
{% endblock %}