Skip to content
Snippets Groups Projects

Výsledkovka pomocí mo.web.table

Closed Jiří Setnička requested to merge jirka/table into master
2 files
+ 143
86
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -17,42 +17,6 @@
@@ -17,42 +17,6 @@
<p>Pořadí je neoficiální (seřazené podle součtu bodů s dělenými místy), testovací
<p>Pořadí je neoficiální (seřazené podle součtu bodů s dělenými místy), testovací
uživatelé jsou skryti. Rozkliknutím bodů se lze dostat na detail daného řešení.</p>
uživatelé jsou skryti. Rozkliknutím bodů se lze dostat na detail daného řešení.</p>
<table class="data full center">
{{ table.to_html() }}
<thead>
<tr>
<th>Pořadí
<th>Účastník
{% if not contest %}<th>Soutěžní oblast{% endif %}
<th>Škola
{% for task in tasks %}<th>
{% if contest %}
<a href="{{ url_for('org_contest_task_submits', contest_id=contest.contest_id, task_id=task.task_id) }}">{{ task.code }}</a>
{% if can_edit_points %}
(<a title="Editovat body" href="{{ url_for('org_contest_task_points', contest_id=contest.contest_id, task_id=task.task_id) }}"></a>)
{% endif %}
{% else %}{{ task.code }}{% endif %}
{% endfor %}
<th>Celkové body
</tr>
</thead>
{% for result in results %}
<tr>
{% if result.order.span > 0 %}<td{% if result.order.span > 1 %} rowspan={{ result.order.span }}{% endif %}>
{{ result.order.format() }}
{% endif %}
<th>{{ result.user|user_link }}
{% if not contest %}<td><a href="{{ url_for('org_contest', id=result.contest.contest_id) }}">{{ result.contest.place.name }}</a>{% endif %}
<td><a href="{{ url_for('org_place', id=result.school.place_id) }}">{{ result.school.name }}</a>
{% for task in tasks %}
<td>{% if task.task_id in result.points %}
<a title="Detail řešení" href="{{ url_for('org_submit_list', contest_id=result.contest.contest_id, user_id=result.user.user_id, task_id=task.task_id) }}">
{% if result.points[task.task_id] is not none %}{{ result.points[task.task_id] }}{% else %}<span class="unknown">?</span>{% endif %}
</a>
{% else %}–{% endif %}
{% endfor %}
<th>{{ result.total_points }}</th>
</tr>
{% endfor %}
</table>
{% endblock %}
{% endblock %}
Loading