61 lines
2.7 KiB
HTML
61 lines
2.7 KiB
HTML
<table class="table table-centered table-nowrap mb-0 rounded" style="margin-top: 30px;">
|
|
<thead class="thead-light">
|
|
<th class="border-0 rounded-start">id</th>
|
|
<th class="border-0">Пользователь</th>
|
|
<th class="border-0">Задача</th>
|
|
<th class="border-0">Время отправки</th>
|
|
<th class="border-0">Язык</th>
|
|
<th class="border-0 rounded-end">Результат</th>
|
|
</thead>
|
|
<tbody>
|
|
{% for solution in solutions %}
|
|
<tr>
|
|
<td>
|
|
<b><a href="/solution?solution_id={{ solution.id }}">{{ solution.id }}</a></b>
|
|
</td>
|
|
<td>
|
|
<img src="{{ solution.user.userinfo.profile_pic_url }}" width="30px" height="30px" style="border-radius: 50%; margin-right: 10px;"><a href="/account?username={{ solution.user.username }}">{{ solution.user }}</a>
|
|
</td>
|
|
<td>
|
|
<a href="/task?task_id={{ solution.task.id }}">{{ solution.task.name }}</a>
|
|
</td>
|
|
<td>
|
|
{{ solution.time_sent }}
|
|
</td>
|
|
<td>
|
|
<img src="{{ solution.language.logo_url }}" width="30px" height="30px">
|
|
{{ solution.language.name }}
|
|
</td>
|
|
<td>
|
|
<h5>
|
|
{% if solution.result == testing_status %}
|
|
<div class="progress">
|
|
<div class="progress-bar bg-info" role="progressbar" style="width: {{ solution.percentage_done }}%;"></div>
|
|
</div>
|
|
{% else %}
|
|
<span class="badge bg-{{ solution.badge_style }}">{{ solution.number_result }}</span>
|
|
{% endif %}
|
|
</h5>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
<input type="hidden" id="page_count" value="{{ pages }}">
|
|
{% if need_pagination %}
|
|
<nav aria-label="Page navigation example" style="display: flex; justify-content: flex-end; margin-top: 20px;">
|
|
<ul class="pagination mb-0">
|
|
<li class="page-item" id="page_prev">
|
|
<a class="page-link" href="#" onclick="setPrev()">Previous</a>
|
|
</li>
|
|
{% for num in count_pages %}
|
|
<li class="page-item" id="page_num_{{ num }}">
|
|
<a class="page-link" href="#" onclick="setPage({{ num }})">{{ num }}</a>
|
|
</li>
|
|
{% endfor %}
|
|
<li class="page-item" id="page_next">
|
|
<a class="page-link" href="#" onclick="setNext()">Next</a>
|
|
</li>
|
|
</ul>
|
|
</nav>
|
|
{% endif %} |