{% extends "tabs-base.html" %} {% block tabs %} {{ make_tab('detail', 'fa-info-circle', url('contest_view', contest.key), _('Info')) }} {% if contest.ended or contest.is_editable_by(request.user) %} {{ make_tab('stats', 'fa-pie-chart', url('contest_stats', contest.key), _('Statistics')) }} {% endif %} {% if contest.start_time <= now or perms.judge.see_private_contest %} {% if contest.show_scoreboard or contest.can_see_scoreboard(request.user) %} {{ make_tab('ranking', 'fa-bar-chart', url('contest_ranking', contest.key), _('Rankings')) }} {% else %} {{ make_tab('ranking', 'fa-bar-chart', None, _('Hidden Rankings')) }} {% endif %} {% if contest.show_scoreboard and request.user.is_authenticated %} {{ make_tab('participation', 'fa-users', url('contest_participation_own', contest.key), _('Participation')) }} {% endif %} {% endif %} {% if contest.is_editable_by(request.user) %} {% if perms.judge.moss_contest and has_moss_api_key %} {{ make_tab('moss', 'fa-gavel', url('contest_moss', contest.key), _('MOSS')) }} {% endif %} {{ make_tab('edit', 'fa-edit', url('admin:judge_contest_change', contest.id), _('Edit')) }} {% endif %} {% if perms.judge.clone_contest %} {{ make_tab('clone', 'fa-copy', url('contest_clone', contest.key), _('Clone')) }} {% endif %} {% if request.user.is_authenticated %} {% if contest.can_join or participating or is_organizer %} {% if contest.ended %} {% if in_contest %} {# They're in the contest because they're participating virtually #}
{% csrf_token %}
{% else %} {# They're in the contest because they're participating virtually #}
{% csrf_token %}
{% endif %} {% else %} {% if in_contest %} {# Allow people with ended participations to continue spectating #}
{% csrf_token %}
{% elif participating and participation.ended or is_organizer %}
{% csrf_token %}
{% elif participating %}
{% csrf_token %}
{% else %}
{% csrf_token %}
{% endif %} {% endif %} {% endif %} {% elif contest.can_join %}
{% endif %} {% endblock %}