Skip to content
Snippets Groups Projects

Tabulka Moje soutěže

Closed Jan Prachař requested to merge honza/mr7 into devel
1 unresolved thread
Files
3
@@ -2,6 +2,56 @@
@@ -2,6 +2,56 @@
{% block title %}Organizátorské rozhraní{% endblock %}
{% block title %}Organizátorské rozhraní{% endblock %}
{% block body %}
{% block body %}
 
{% if contests %}
 
<h3>Moje soutěže</h3>
 
 
<table class="table table-bordered">
 
{% set curr = namespace(level = -1) %}
 
{% for c, role in contests %}
 
{% set cr = gatekeeper.rights_for_contest(c) %}
 
{% if curr.level != c.round.level %}
 
<thead><tr>
 
<th>Kategorie
 
<th>Kolo
 
<th>{{ c.round.get_level().name|capitalize }}
 
<th>Stav
 
<th>Zadání
 
<th>Moje role
 
<th>Odkazy
 
</thead>
 
{% set curr.level = c.round.level %}
 
{% endif %}
 
<tr class="rstate-{{c.state.name}}">
 
<td class="text-center"><b>{{ c.round.category }}</b>
 
<td>{{ c.round.name }}
 
<td>{{ c.place.name }}
 
<td>{{ c.state.friendly_name() }}
 
<td>
 
{% set can, reason = cr.can_view_statement_with_reason() %}
 
{% if can %}
 
<a href='{{ url_for('org_task_statement', id=c.round_id) }}'>stáhnout</a>
 
{% else %}
 
{{ reason }}
 
{% endif %}
 
<td>{{ role_names[role] }}
 
<td>
 
<a class="btn btn-xs btn-primary" href='{{ url_for('org_contest', id=c.contest_id) }}'>Detail</a>
 
<a class="btn btn-xs btn-default" href='{{ url_for('org_contest_list', id=c.contest_id) }}'>Účastníci</a>
 
{% if cr.have_right(Right.view_submits) and c.state != RoundState.preparing %}
 
<a class="btn btn-xs btn-success" href='{{ url_for('org_contest_solutions', id=c.contest_id) }}'>Odevzdaná řešení</a>
 
{% endif %}
 
{% if (c.state == RoundState.grading and cr.have_right(Right.view_submits)) or c.state == RoundState.closed %}
 
<a class="btn btn-xs btn-warning" href='{{ url_for('org_score', contest_id=c.contest_id) }}'>Výsledky</a>
 
{% endif %}
 
{% if cr.have_right(Right.manage_contest) and c.state == RoundState.preparing %}
 
<a class="btn btn-xs btn-default" href='{{ url_for('org_contest_import', id=c.contest_id) }}'>Import</a>
 
{% endif %}
 
</td>
 
</tr>
 
{% endfor %}
 
</table>
 
{% endif %}
 
<h3>Různé</h3>
<h3>Různé</h3>
<ul>
<ul>
Loading