From 38d1cdd7a9761b232717a37ebc8f6e618345409e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ji=C5=99=C3=AD=20Setni=C4=8Dka?= <setnicka@seznam.cz>
Date: Mon, 1 Mar 2021 21:59:50 +0100
Subject: [PATCH] =?UTF-8?q?Round:=20Nenab=C3=ADz=C3=ADme=20mazat=20=C3=BAl?=
 =?UTF-8?q?ohu=20s=20=C5=99e=C5=A1en=C3=ADmi?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Stejně to nejde... ;) Fix #180
---
 mo/web/templates/org_round.html | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/mo/web/templates/org_round.html b/mo/web/templates/org_round.html
index 678a2920..f7b53848 100644
--- a/mo/web/templates/org_round.html
+++ b/mo/web/templates/org_round.html
@@ -104,11 +104,13 @@
 			{% 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>
+				{% if task.sol_count == 0 %}
 				<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>
+				{% endif %}
 				{% if g.user.is_admin %}
 				<a class="btn btn-xs btn-default" href="{{ log_url('task', task.task_id) }}">Historie</a>
 				{% endif %}
-- 
GitLab