diff --git a/mo/web/templates/org_contest.html b/mo/web/templates/org_contest.html index 2d790c931a601bf0540353707a67fcd421589a46..3cdfaf74bce212d18a0658306b1e1ef32aad6d55 100644 --- a/mo/web/templates/org_contest.html +++ b/mo/web/templates/org_contest.html @@ -1,5 +1,7 @@ {% extends "base.html" %} {% set round = contest.round %} +{% set state = contest.state %} +{% set ct_state = contest.ct_state() %} {% set site_id = site.place_id if site else None %} {% block title %} @@ -16,15 +18,11 @@ {% if site %} <tr><td>Soutěžní místo<td><a href='{{ url_for('org_place', id=site.place_id) }}'>{{ site.name }}</a> {% endif %} - {% with state=contest.state %} <tr><td>Stav<td><span class='rstate-{{state.name}}'>{{ state.friendly_name() }}</span> {% if round.state != RoundState.delegate %} (určeno nastavením kola) {% endif %} - {% endwith %} - {% with state=contest.ct_state() %} - <tr><td>Stav pro účastníky<td><span class='rstate-{{state.name}}'>{{ state.friendly_name() }}</span> - {% endwith %} + <tr><td>Stav pro účastníky<td><span class='rstate-{{ct_state.name}}'>{{ ct_state.friendly_name() }}</span> <tr><td>Vaše role<td>{% if g.user.is_admin %}správce{% elif roles %}{{ roles|join(", ") }}{% else %}–{% endif %} {% if group_contests|length > 1 %} <tr><td>Soutěže ve skupině kol:<td> @@ -48,14 +46,14 @@ <div class="btn-group"> <a class="btn btn-primary" href='{{ url_for('org_contest_list', id=contest.contest_id, site_id=site_id) }}'>Seznam účastníků</a> - {% if round.state != RoundState.preparing %} + {% if state != RoundState.preparing %} <a class="btn btn-primary" href='{{ url_for('org_contest_solutions', id=contest.contest_id, site_id=site_id) }}'>Odevzdaná řešení</a> {% endif %} {% if not site %} - {% if round.state in [RoundState.grading, RoundState.closed] %} + {% if state in [RoundState.grading, RoundState.closed] %} <a class="btn btn-primary" href='{{ url_for('org_score', contest_id=contest.contest_id) }}'>Výsledky</a> {% endif %} - {% if round.state == RoundState.preparing and round.seq > 1 %} + {% if state == RoundState.preparing and round.seq > 1 %} <a class="btn btn-primary" href='{{ url_for('org_contest_advance', contest_id=contest.contest_id) }}'>Postup z minulého kola</a> {% endif %} {% if can_manage %} diff --git a/mo/web/templates/org_index.html b/mo/web/templates/org_index.html index 7acd4cecaf1dea3a030c8fac0f3dfe8e05cb3945..3244560a7a35b1ed49cf594848f2e3e7721e51e9 100644 --- a/mo/web/templates/org_index.html +++ b/mo/web/templates/org_index.html @@ -11,6 +11,7 @@ <a href='{{ url_for('org_export_skoly', format='en_csv') }}'>CSV s čárkami</a>, <a href='{{ url_for('org_export_skoly', format='cs_csv') }}'>CSV se středníky</a>, <a href='{{ url_for('org_export_skoly', format='tsv') }}'>TSV</a> +<li><a href='https://docs.google.com/document/d/1XXk7Od-ZKtfmfNa-9FpFjUqmy0Ekzf2-2q3EpSWyn1w/edit?usp=sharing'>Návod na tvorbu PDF</a> </ul> <h3>Rychlé hledání</h3> diff --git a/mo/web/user.py b/mo/web/user.py index d4c70451c82986e50568152161d2d9a1efdf413e..65a958da2e7f61c8b2e30cafb85995fd6d9e6781 100644 --- a/mo/web/user.py +++ b/mo/web/user.py @@ -18,7 +18,7 @@ from mo.web import app import mo.web.util -@app.route('/user') +@app.route('/user/') def user_index(): pcrs = load_pcrs() if getattr(config, 'AUTO_REGISTER_TEST', False) and not any(round.category == 'T' for pion, contest, round in pcrs):