From 50407bf35f3bb88d87c2b4ca86766ebc78c585fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Setni=C4=8Dka?= <setnicka@seznam.cz> Date: Fri, 19 Feb 2021 20:25:27 +0100 Subject: [PATCH] =?UTF-8?q?Akce=20u=20v=C3=BDpisu=20=C3=BAloh=20rozd=C4=9B?= =?UTF-8?q?leny=20na=20jednotliv=C3=A9=20akce=20a=20d=C3=A1vkov=C3=A9=20op?= =?UTF-8?q?erace?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mo/web/templates/org_contest.html | 17 +++++++++++------ mo/web/templates/org_round.html | 19 ++++++++++++------- 2 files changed, 23 insertions(+), 13 deletions(-) diff --git a/mo/web/templates/org_contest.html b/mo/web/templates/org_contest.html index c6ecb514..510d74c2 100644 --- a/mo/web/templates/org_contest.html +++ b/mo/web/templates/org_contest.html @@ -84,7 +84,8 @@ <th>Kód <th>Název <th>Odevzdaná řešení - <th>Akce + <th>Jednotlivé akce + <th>Dávkové operace </tr> </thead> {% for task in tasks %} @@ -94,15 +95,19 @@ <td>{{ task.sol_count }} <td><div class="btn-group"> <a class="btn btn-xs btn-primary" href="{{ url_for('org_contest_task', contest_id=contest.contest_id, task_id=task.task_id, site_id=site_id) }}">Odevzdaná řešení</a> - <a class="btn btn-xs btn-primary" href="{{ url_for('org_contest_task_download', contest_id=contest.contest_id, task_id=task.task_id, site_id=site_id) }}">Stáhnout</a> - {% if can_upload %} - <a class='btn btn-xs btn-primary' href="{{ url_for('org_contest_task_upload', contest_id=contest.contest_id, task_id=task.task_id, site_id=site_id) }}">Nahrát</a> + {% if not site and can_edit_points %} + <a class="btn btn-xs btn-default" href="{{ url_for('org_contest_task_points', contest_id=contest.contest_id, task_id=task.task_id) }}">Zadat body</a> {% endif %} {% if can_create_solutions %} - <a class="btn btn-xs btn-primary" href="{{ url_for('org_contest_task_create', contest_id=contest.contest_id, task_id=task.task_id, site_id=site_id) }}">Založit řešení</a> + <a class="btn btn-xs btn-default" href="{{ url_for('org_contest_task_create', contest_id=contest.contest_id, task_id=task.task_id, site_id=site_id) }}">Založit řešení</a> + {% endif %} + </div> + <td><div class="btn-group"> + <a class="btn btn-xs btn-primary" href="{{ url_for('org_contest_task_download', contest_id=contest.contest_id, task_id=task.task_id, site_id=site_id) }}">Stáhnout ZIP</a> + {% if can_upload %} + <a class='btn btn-xs btn-default' href="{{ url_for('org_contest_task_upload', contest_id=contest.contest_id, task_id=task.task_id, site_id=site_id) }}">Nahrát ZIP</a> {% endif %} {% if not site and can_edit_points %} - <a class="btn btn-xs btn-primary" href="{{ url_for('org_contest_task_points', contest_id=contest.contest_id, task_id=task.task_id) }}">Zadat body</a> <a class="btn btn-xs btn-default" href="{{ url_for('org_contest_task_batch_points', contest_id=contest.contest_id, task_id=task.task_id) }}">Nahrát body</a> {% endif %} </div> diff --git a/mo/web/templates/org_round.html b/mo/web/templates/org_round.html index 3296d22b..9f6d685c 100644 --- a/mo/web/templates/org_round.html +++ b/mo/web/templates/org_round.html @@ -89,7 +89,8 @@ <th>Kód <th>Název <th>Odevzdaná řešení - {% if can_manage_round or can_handle_submits %}<th>Akce{% endif %} + {% if can_manage_round %}<th>Akce{% endif %} + {% if can_handle_submits or can_upload %}<th>Dávkové operace{% endif %} </tr> </thead> {% for task in tasks %} @@ -97,28 +98,32 @@ <td>{{ task.code }} <td>{{ task.name }} <td>{{ task.sol_count }} + {% if can_manage_round %} <td><div class="btn-group"> - {% if can_manage_round %} <a class="btn btn-xs btn-primary" href="{{ url_for('org_round_task_edit', id=round.round_id, task_id=task.task_id) }}">Editovat</a> <form action="" method="POST" onsubmit="return confirm('Opravdu nenávratně smazat?')" class="btn-group"> {{ form_delete_task.csrf_token() }} <input type="hidden" name="delete_task_id" value="{{ task.task_id }}"> <button type="submit" class="btn btn-xs btn-danger">Smazat</button> </form> + {% if g.user.is_admin %} + <a class="btn btn-xs btn-default" href="{{ log_url('task', task.task_id) }}">Historie</a> {% endif %} + </div> + {% endif %} + {% if can_handle_submits or can_upload %} + <td><dic class="btn-group"> {% if can_handle_submits %} - <a class="btn btn-xs btn-primary" href="{{ url_for('org_round_task_download', round_id=round.round_id, task_id=task.task_id) }}">Stáhnout</a> + <a class="btn btn-xs btn-primary" href="{{ url_for('org_round_task_download', round_id=round.round_id, task_id=task.task_id) }}">Stáhnout ZIP</a> {% endif %} {% if can_upload %} - <a class="btn btn-xs btn-primary" href="{{ url_for('org_round_task_upload', round_id=round.round_id, task_id=task.task_id) }}">Nahrát</a> + <a class="btn btn-xs btn-primary" href="{{ url_for('org_round_task_upload', round_id=round.round_id, task_id=task.task_id) }}">Nahrát ZIP</a> {% endif %} {% if can_upload %} <a class="btn btn-xs btn-default" href="{{ url_for('org_round_task_batch_points', round_id=round.round_id, task_id=task.task_id) }}">Nahrát body</a> {% endif %} - {% if g.user.is_admin %} - <a class="btn btn-xs btn-default" href="{{ log_url('task', task.task_id) }}">Historie</a> - {% endif %} </div> + {% endif %} </tr> {% endfor %} </table> -- GitLab