Skip to content
Snippets Groups Projects
Commit f416e750 authored by Jiří Kalvoda's avatar Jiří Kalvoda
Browse files

Přidány odkazy na přidání účastníka

parent 085db22d
No related branches found
No related tags found
1 merge request!90Formulářová políčka; Přidání účastníka do soutěže; Editace registrace do ročníku
...@@ -49,6 +49,9 @@ ...@@ -49,6 +49,9 @@
{% if 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> <a class="btn btn-primary" href='{{ url_for('org_contest_solutions', id=contest.contest_id, site_id=site_id) }}'>Odevzdaná řešení</a>
{% endif %} {% endif %}
{% if can_manage and site %}
<a class="btn btn-default" href="{{ url_for('org_contest_add_user', id=contest.contest_id, site_id=site_id) }}">Přidat účastníka</a>
{% endif %}
{% if not site %} {% if not site %}
{% if 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> <a class="btn btn-primary" href='{{ url_for('org_score', contest_id=contest.contest_id) }}'>Výsledky</a>
...@@ -73,25 +76,37 @@ ...@@ -73,25 +76,37 @@
{% if places_counts %} {% if places_counts %}
<table class=data> <table class=data>
<thead> <thead>
<tr><th>Místo<th>Počet účastníků <tr><th>Místo<th>Počet účastníků<th>Akce
</thead> </thead>
{% for (place, count) in places_counts %} {% for (place, count) in places_counts %}
<tr> <tr>
<td><a href="{{ url_for('org_contest', id=contest.contest_id, site_id=place.place_id) }}">{{ place.name }}</a> <td><a href="{{ url_for('org_contest', id=contest.contest_id, site_id=place.place_id) }}">{{ place.name }}</a>
<td>{{ count }} <td>{{ count }}
<td><div class="btn-group">
<a class="btn btn-xs btn-primary" href="{{ url_for('org_contest', id=contest.contest_id, site_id=place.place_id) }}">Detail</a>
{% if can_manage %}
<a class="btn btn-xs btn-default" href="{{ url_for('org_contest_add_user', id=contest.contest_id, site_id=place.place_id) }}">Přidat účastníka</a>
</div>
{% endif %}
</tr> </tr>
{% endfor %} {% endfor %}
<tfoot> <tfoot>
<tr> <tr>
<th>Celkem <th>Celkem
<th>{{ places_counts|sum(attribute=1) }} <th>{{ places_counts|sum(attribute=1) }}
<th>
</tr> </tr>
</tfoot> </tfoot>
</table> </table>
{% else %} {% else %}
<i>Žádní účastníci a žádná soutěžní místa.</i> <p><i>Žádní účastníci a žádná soutěžní místa.</i></p>
{% endif %} {% endif %}
{% endif %} {% endif %}
<div class="btn-group">
{% if can_manage and not site %}
<a class="btn btn-default" href='{{ url_for('org_contest_add_user', id=contest.contest_id) }}'>Přidat účastníka</a>
{% endif %}
</div>
<h3>Úlohy</h3> <h3>Úlohy</h3>
{% if tasks %} {% if tasks %}
......
...@@ -4,7 +4,10 @@ ...@@ -4,7 +4,10 @@
{{ table.to_html() }} {{ table.to_html() }}
<a class="btn btn-primary pull-right" {% if contest %}
<a class="btn btn-primary" href="{{ url_for('org_contest_add_user', id=contest.contest_id, site_id=site.place_id if site else None) }}">Přidat účastníka</a>
{% endif %}
<a class="btn btn-default"
title="Zobrazí emailové adresy ve snadno zkopírovatelném formátu" title="Zobrazí emailové adresy ve snadno zkopírovatelném formátu"
href="{{ url_for('org_contest_list_emails', id=id, site_id=site_id, **request.args) if contest else url_for('org_round_list_emails', id=id, **request.args) }}"> href="{{ url_for('org_contest_list_emails', id=id, site_id=site_id, **request.args) if contest else url_for('org_round_list_emails', id=id, **request.args) }}">
Vypsat e-mailové adresy Vypsat e-mailové adresy
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment