diff --git a/mo/web/templates/org_contest.html b/mo/web/templates/org_contest.html index 36eb3b62772f8e11c69e1632c2796e9c2bfc361b..485ffd92fe278985019c9dc243200b1c412317c4 100644 --- a/mo/web/templates/org_contest.html +++ b/mo/web/templates/org_contest.html @@ -49,6 +49,9 @@ {% 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 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 state in [RoundState.grading, RoundState.closed] %} <a class="btn btn-primary" href='{{ url_for('org_score', contest_id=contest.contest_id) }}'>Výsledky</a> @@ -73,25 +76,37 @@ {% if places_counts %} <table class=data> <thead> - <tr><th>Místo<th>Počet účastníků + <tr><th>Místo<th>Počet účastníků<th>Akce </thead> {% for (place, count) in places_counts %} <tr> <td><a href="{{ url_for('org_contest', id=contest.contest_id, site_id=place.place_id) }}">{{ place.name }}</a> <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> {% endfor %} <tfoot> <tr> <th>Celkem <th>{{ places_counts|sum(attribute=1) }} + <th> </tr> </tfoot> </table> {% 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 %} +<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> {% if tasks %} diff --git a/mo/web/templates/parts/org_participants_table_actions.html b/mo/web/templates/parts/org_participants_table_actions.html index 24eb85aa361049b900d3a1672d8637673e50cfda..0eec0d02a253fa76728b4d2623192de5c44acd3e 100644 --- a/mo/web/templates/parts/org_participants_table_actions.html +++ b/mo/web/templates/parts/org_participants_table_actions.html @@ -4,7 +4,10 @@ {{ 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" 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