From 795842ed8acea373e23e672d8087cf12b14b78d8 Mon Sep 17 00:00:00 2001
From: Martin Mares <mj@ucw.cz>
Date: Sat, 12 Apr 2025 20:30:15 +0200
Subject: [PATCH] =?UTF-8?q?Na=20str=C3=A1nce=20kola=20neukazujeme=20po?=
 =?UTF-8?q?=C4=8Det=20p=C5=99ihl=C3=A1=C5=A1ek=20zbyte=C4=8Dn=C4=9B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Ukazuje se jen tehdy, vyžaduje-li kolo potvrzení přihlášek
organizátorem.

Closes #427.
---
 mo/web/jinja.py                 | 1 +
 mo/web/templates/org_round.html | 6 ++++++
 2 files changed, 7 insertions(+)

diff --git a/mo/web/jinja.py b/mo/web/jinja.py
index b0b8d654..3f8dca08 100644
--- a/mo/web/jinja.py
+++ b/mo/web/jinja.py
@@ -61,6 +61,7 @@ jg.update(JobType=db.JobType)
 jg.update(JobState=db.JobState)
 jg.update(RoundType=db.RoundType)
 jg.update(CertType=db.CertType)
+jg.update(RoundEnrollMode=db.RoundEnrollMode)
 
 # Další typy:
 jg.update(Markup=Markup)
diff --git a/mo/web/templates/org_round.html b/mo/web/templates/org_round.html
index 6afca009..8c057824 100644
--- a/mo/web/templates/org_round.html
+++ b/mo/web/templates/org_round.html
@@ -149,7 +149,9 @@
 				<th>Stavy soutěží
 			{% endif %}
 				<th><a href='{{ ctx.url_for('org_contestant_stats') }}' }}' title='Statistiky účastníků'>Počet účastníků</a>
+			{% if round.enroll_mode == RoundEnrollMode.confirm %}
 				<th>Počet přihlášek
+			{% endif %}
 			</tr>
 		</thead>
 		{% for rs in reg_stats %}
@@ -168,7 +170,9 @@
 			<td>{% for s in rs.contest_states %}{% if not loop.first %} / {% endif %}<span class='rstate-{{s.name}}'>{{ s.friendly_name() }}</span>{% endfor %}
 		{% endif %}
 			<td>{{ rs.num_active_pants }}
+		{% if round.enroll_mode == RoundEnrollMode.confirm %}
 			<td>{{ rs.num_unconfirmed_pants }}
+		{% endif %}
 		{% endfor %}
 		<tfoot>
 			<tr>
@@ -180,7 +184,9 @@
 				<th>
 			{% endif %}
 				<th>{{ reg_total.num_active_pants }}
+			{% if round.enroll_mode == RoundEnrollMode.confirm %}
 				<th>{{ reg_total.num_unconfirmed_pants }}
+			{% endif %}
 			</tr>
 		</tfoot>
 	</table>
-- 
GitLab