Skip to content
Snippets Groups Projects
Commit 30afb612 authored by Jan Prachař's avatar Jan Prachař
Browse files

org_index: Výsledkovky pro hierarchické odkazy

parent ffc17910
Branches
No related tags found
No related merge requests found
...@@ -90,7 +90,7 @@ def org_index(): ...@@ -90,7 +90,7 @@ def org_index():
if ct: if ct:
o.rights = g.gatekeeper.rights_for_contest(ct) o.rights = g.gatekeeper.rights_for_contest(ct)
else: else:
o.rights = g.gatekeeper.rights_for_round(r) o.rights = g.gatekeeper.rights_for_round(r, for_place=ur.place)
overview.append(o) overview.append(o)
o.role_set.add(ur.role) o.role_set.add(ur.role)
......
...@@ -83,11 +83,11 @@ ...@@ -83,11 +83,11 @@
</form> </form>
{% endif %} {% endif %}
{% if o.contest %} {% if o.contest %}
{% if o.rights.can_view_submits() and o.contest.state != RoundState.preparing %}
<a class="btn btn-xs btn-success" href='{{ url_for('org_contest_solutions', ct_id=o.contest.contest_id) }}'>Odevzdaná řešení</a>
{% endif %}
{% if (o.contest.state == RoundState.grading and o.rights.have_right(Right.view_contestants)) or o.contest.state == RoundState.closed %} {% if (o.contest.state == RoundState.grading and o.rights.have_right(Right.view_contestants)) or o.contest.state == RoundState.closed %}
<a class="btn btn-xs btn-warning" href='{{ url_for('org_score', ct_id=o.contest.contest_id) }}'>Výsledky</a> <a class="btn btn-xs btn-warning" href='{{ o.url_for('org_score') }}'>Výsledky</a>
{% endif %}
{% if o.rights.can_view_submits() and o.contest.state != RoundState.preparing and o.contest.state != RoundState.closed %}
<a class="btn btn-xs btn-success" href='{{ url_for('org_contest_solutions', ct_id=o.contest.contest_id) }}'>Odevzdaná řešení</a>
{% endif %} {% endif %}
{% if o.rights.have_right(Right.manage_contest) and o.contest.state != RoundState.closed %} {% if o.rights.have_right(Right.manage_contest) and o.contest.state != RoundState.closed %}
<a class="btn btn-xs btn-default" href="{{ url_for('org_contest_add_user', ct_id=o.contest.contest_id) }}">+ Přidat účastníka</a> <a class="btn btn-xs btn-default" href="{{ url_for('org_contest_add_user', ct_id=o.contest.contest_id) }}">+ Přidat účastníka</a>
...@@ -95,6 +95,10 @@ ...@@ -95,6 +95,10 @@
{% if o.rights.have_right(Right.manage_contest) and o.contest.state == RoundState.preparing %} {% if o.rights.have_right(Right.manage_contest) and o.contest.state == RoundState.preparing %}
<a class="btn btn-xs btn-default" href='{{ url_for('org_generic_import', ct_id=o.contest.contest_id) }}'>Import</a> <a class="btn btn-xs btn-default" href='{{ url_for('org_generic_import', ct_id=o.contest.contest_id) }}'>Import</a>
{% endif %} {% endif %}
{% else %}
{% if (o.lowest_state == RoundState.grading and o.rights.have_right(Right.view_contestants)) or o.lowest_state == RoundState.closed and o.num_contests > 0 %}
<a class="btn btn-xs btn-warning" href='{{ o.url_for('org_score') }}'>Výsledky</a>
{% endif %}
{% endif %} {% endif %}
</td> </td>
</tr> </tr>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment