From e89976d7769de513e50de537cd435f6a9ef4a4a3 Mon Sep 17 00:00:00 2001
From: Martin Mares <mj@ucw.cz>
Date: Sun, 9 Feb 2025 21:33:42 +0100
Subject: [PATCH] =?UTF-8?q?Score:=20=C3=9Aprava=20odkaz=C5=AF=20na=20v?=
 =?UTF-8?q?=C3=BDsledkovky?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 mo/web/templates/org_score_snapshot.html | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/mo/web/templates/org_score_snapshot.html b/mo/web/templates/org_score_snapshot.html
index 8cfdbadc..f9685753 100644
--- a/mo/web/templates/org_score_snapshot.html
+++ b/mo/web/templates/org_score_snapshot.html
@@ -28,19 +28,18 @@
 	<input type="hidden" name="back_url" value="{{ ctx.url_for('org_score_snapshot', scoretable_id=scoretable.scoretable_id) }}">
 	<input type="hidden" name="scoretable_id" value="{{ scoretable.scoretable_id }}">
 	<div class="btn-group pull-right">
-	{% if cset and cset.scoretable_id == scoretable.scoretable_id %}
-		<a class="btn btn-default" href="{{ ctx.url_for('org_certificates', contest_id=master_ct_id) }}">Zobrazit diplomy</a>
-	{% endif %}
 	{% if ctx.master_contest.scoretable_id == scoretable.scoretable_id %}
-		{% if not cset or cset.scoretable_id is none %}
-			<a class="btn btn-primary" href="{{ ctx.url_for('org_certificates', contest_id=master_ct_id) }}">Vydat diplomy</a>
-		{% elif cset and cset.scoretable_id != scoretable.scoretable_id %}
-			<a class="btn btn-success" href="{{ ctx.url_for('org_certificates', contest_id=master_ct_id) }}">Aktualizovat diplomy</a>
-		{% endif %}
 		<input type="submit" name="submit_hide" class="btn btn-danger" value="Zrušit zveřejnění">
 	{% else %}
 		<input type="submit" name="submit_set_final" class="btn btn-primary" value="Zveřejnit tuto verzi">
 	{% endif %}
+	{% if not cset or cset.scoretable_id is none %}
+		<a class="btn btn-primary" href="{{ ctx.url_for('org_certificates', contest_id=master_ct_id) }}">Vydat diplomy</a>
+	{% elif cset.scoretable_id == scoretable.scoretable_id %}
+		<a class="btn btn-default" href="{{ ctx.url_for('org_certificates', contest_id=master_ct_id) }}">Zobrazit diplomy</a>
+	{% else %}
+		<a class="btn btn-success" href="{{ ctx.url_for('org_certificates', contest_id=master_ct_id) }}">Aktualizovat diplomy</a>
+	{% endif %}
 	</div>
 </form>
 {% endif %}
-- 
GitLab