Skip to content
Snippets Groups Projects
Commit a6e09634 authored by Jiří Setnička's avatar Jiří Setnička
Browse files

Akce u výpisu úloh rozděleny na jednotlivé akce a dávkové operace

parent bfa470e9
No related branches found
No related tags found
No related merge requests found
This commit is part of merge request !30. Comments created here will be created in the context of that merge request.
...@@ -84,7 +84,8 @@ ...@@ -84,7 +84,8 @@
<th>Kód <th>Kód
<th>Název <th>Název
<th>Odevzdaná řešení <th>Odevzdaná řešení
<th>Akce <th>Jednotlivé akce
<th>Dávkové operace
</tr> </tr>
</thead> </thead>
{% for task in tasks %} {% for task in tasks %}
...@@ -94,15 +95,19 @@ ...@@ -94,15 +95,19 @@
<td>{{ task.sol_count }} <td>{{ task.sol_count }}
<td><div class="btn-group"> <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', 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 not site and can_edit_points %}
{% if can_upload %} <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>
<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>
{% endif %} {% endif %}
{% if can_create_solutions %} {% 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 %} {% endif %}
{% if not site and can_edit_points %} {% 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> <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 %} {% endif %}
</div> </div>
......
...@@ -89,7 +89,8 @@ ...@@ -89,7 +89,8 @@
<th>Kód <th>Kód
<th>Název <th>Název
<th>Odevzdaná řešení <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> </tr>
</thead> </thead>
{% for task in tasks %} {% for task in tasks %}
...@@ -97,28 +98,32 @@ ...@@ -97,28 +98,32 @@
<td>{{ task.code }} <td>{{ task.code }}
<td>{{ task.name }} <td>{{ task.name }}
<td>{{ task.sol_count }} <td>{{ task.sol_count }}
<td><div class="btn-group">
{% if can_manage_round %} {% if can_manage_round %}
<td><div class="btn-group">
<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> <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 action="" method="POST" onsubmit="return confirm('Opravdu nenávratně smazat?')" class="btn-group">
{{ form_delete_task.csrf_token() }} {{ form_delete_task.csrf_token() }}
<input type="hidden" name="delete_task_id" value="{{ task.task_id }}"> <input type="hidden" name="delete_task_id" value="{{ task.task_id }}">
<button type="submit" class="btn btn-xs btn-danger">Smazat</button> <button type="submit" class="btn btn-xs btn-danger">Smazat</button>
</form> </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 %} {% endif %}
{% if can_handle_submits or can_upload %}
<td><dic class="btn-group">
{% if can_handle_submits %} {% 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 %} {% endif %}
{% if can_upload %} {% 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 %} {% endif %}
{% if can_upload %} {% 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> <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 %} {% endif %}
{% if g.user.is_admin %}
<a class="btn btn-xs btn-default" href="{{ log_url('task', task.task_id) }}">Historie</a>
{% endif %}
</div> </div>
{% endif %}
</tr> </tr>
{% endfor %} {% endfor %}
</table> </table>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment