Skip to content
Snippets Groups Projects

user_index: Přehlednější vstupní stránka pro účastníka

Merged Jan Prachař requested to merge honza/mr9 into devel
Files
2
@@ -8,23 +8,39 @@
<table class="table">
<thead>
<tr>
<th title='ročník MO'>Roč.
<th title='kategorie'>Kat.
<th>Kategorie
<th>Kolo
<th>Oblast
<th>Stav
<th>Akce
<th>Stav účasti
<th>Stav soutěže
<th>Odkazy
<tbody>
{% for pion, contest, round in pions %}
{% set state = contest.ct_state() %}
<tr>
<td>{{ round.year }}
<td>{{ round.category }}
<td>{{ round.name }}
<td>{{ contest.place.name }}
<td class="text-center" style="font-size: 1.2em"><b>{{ round.category }}</b>
<td>{{ round.name }} {{ contest.place.name_locative() if contest.place.level > 0 else '' }}
<td>{{ pion.state.friendly_name() }}
<td>{{ contest.ct_long_state() }}
<td><div class="btn-group">
<a class='btn btn-xs btn-primary' href='{{ url_for('user_contest', id=contest.contest_id) }}'>Detail kola</a>
</div>
<td>
{% if contest.ct_task_statement_available() %}
<a class='btn btn-xs btn-success' href='{{ url_for('user_task_statement', id=contest.contest_id) }}'>Zadání</a>
{% endif %}
{% if state != RoundState.preparing %}
<a class='btn btn-xs btn-primary' href='{{ url_for('user_contest', id=contest.contest_id) }}'>
{% if state == RoundState.running %}
Odevzdat řešení
{% elif state == RoundState.grading %}
Odevzdaná řešení
{% elif state == RoundState.closed %}
Prohlédnout opravy
{% else %}
Detail kola
{% endif %}
</a>
{% endif %}
{% if state == RoundState.closed %}
<a class="btn btn-xs btn-warning" href='{{ url_for('public_score', contest_id=contest.contest_id) }}'>Výsledky</a>
{% endif %}
{% endfor %}
</table>
{% else %}
Loading