This commit is contained in:
Administrator
2022-04-18 06:52:24 +00:00
parent 28f29fa610
commit 01c592100d
474 changed files with 48732 additions and 1609 deletions

View File

@@ -1,54 +1,61 @@
<table class="table" style="margin-top: 30px;">
<thead>
<th scope="col">id</th>
<th scope="col">Пользователь</th>
<th scope="col">Задача</th>
<th scope="col">Время отправки</th>
<th scope="col">Язык</th>
<th scope="col">Результат</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>
<h4>
{% if solution.result == testing_status %}
<div class="progress">
<div class="progress-bar progress-bar-striped progress-bar-animated" role="progressbar" style="width: {{ solution.percentage_done }}%"></div>
</div>
{% else %}
<span class="badge badge-{{ solution.badge_style }}">{{ solution.number_result }}</span>
{% endif %}
</h4>
</td>
</tr>
{% endfor %}
</tbody>
</table>
<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 %}
<div style="display: flex; justify-content: flex-end">
<table>
<tr>
<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 %}
<td><button class="btn btn-light" id="page_num_{{ num }}" onclick="setPage({{ num }})">{{ num }}</button></td>
<li class="page-item" id="page_num_{{ num }}">
<a class="page-link" href="#" onclick="setPage({{ num }})">{{ num }}</a>
</li>
{% endfor %}
</tr>
</table>
</div>
<li class="page-item" id="page_next">
<a class="page-link" href="#" onclick="setNext()">Next</a>
</li>
</ul>
</nav>
{% endif %}