From ad67afef128f0664bd236297662d07e5b78f9691 Mon Sep 17 00:00:00 2001
From: Helge Jung <hej@c3pb.de>
Date: Wed, 25 Dec 2024 19:47:03 +0100
Subject: [PATCH] bugfix: don't show SoS as official

---
 src/plainui/jinja2/plainui/event.html.j2    | 16 +++++++++++-----
 src/plainui/locale/de/LC_MESSAGES/django.po |  6 +++---
 src/plainui/locale/en/LC_MESSAGES/django.po |  6 +++---
 3 files changed, 17 insertions(+), 11 deletions(-)

diff --git a/src/plainui/jinja2/plainui/event.html.j2 b/src/plainui/jinja2/plainui/event.html.j2
index 007c0e88b..3ab6d9958 100644
--- a/src/plainui/jinja2/plainui/event.html.j2
+++ b/src/plainui/jinja2/plainui/event.html.j2
@@ -106,17 +106,23 @@
               <div class="hub-tags">
                 {{ eventMacro.recorded_tag(event.is_recorded) }}
 
-                {% if assembly.is_official %}
+                {% if event.kind == event.Kind.OFFICIAL %}
                   {{ tagboxMacro.tag(_("Event__official") ,
                   style='secondary',
                   icon='star-fill',
                   title=_('Event__official__help')
                   ) }}
-                {% elif event.kind != 'official' %}
-                  {{ tagboxMacro.tag(_("Self-organized Session") if event.kind == 'sos' else _("Assembly-Event"),
+                {% elif event.kind == event.Kind.ASSEMBLY %}
+                  {{ tagboxMacro.tag(_("Assembly-Event") ,
                   style='secondary',
-                  icon='person-video3' if event.kind == 'sos' else 'person-arms-up',
-                  title=_('Event__sos__help') if event.kind == 'sos' else _('Event__assembly__help'),
+                  icon='person-arms-up',
+                  title=_('Event__assembly__help'),
+                  ) }}
+                {% elif event.kind == event.Kind.SELF_ORGANIZED %}
+                  {{ tagboxMacro.tag(_("Self-organized Session") ,
+                  style='secondary',
+                  icon='person-video3',
+                  title=_('Event__sos__help'),
                   ) }}
                 {% endif %}
 
diff --git a/src/plainui/locale/de/LC_MESSAGES/django.po b/src/plainui/locale/de/LC_MESSAGES/django.po
index 35d730781..adcb3ec55 100644
--- a/src/plainui/locale/de/LC_MESSAGES/django.po
+++ b/src/plainui/locale/de/LC_MESSAGES/django.po
@@ -976,12 +976,12 @@ msgstr "offiziell"
 msgid "Event__official__help"
 msgstr "Offizielle Veranstaltung werden vom Veranstalter kuratiert."
 
-msgid "Event__sos__help"
-msgstr "Selbst organisierte Sessions werden durch Einzelpersonen veranstaltet."
-
 msgid "Event__assembly__help"
 msgstr "Assembly-Veranstaltungen werden von einer Assembly - einer vorangemeldeten Gruppe an Teilnehmenden - veranstaltet."
 
+msgid "Event__sos__help"
+msgstr "Selbst organisierte Sessions werden durch Einzelpersonen veranstaltet."
+
 msgid "Fahrplan"
 msgstr "Schedule"
 
diff --git a/src/plainui/locale/en/LC_MESSAGES/django.po b/src/plainui/locale/en/LC_MESSAGES/django.po
index 64f61689e..cb8b29fa8 100644
--- a/src/plainui/locale/en/LC_MESSAGES/django.po
+++ b/src/plainui/locale/en/LC_MESSAGES/django.po
@@ -976,12 +976,12 @@ msgstr "official"
 msgid "Event__official__help"
 msgstr "Official events are curated by the organizer."
 
-msgid "Event__sos__help"
-msgstr "Self-organized sessions are organized by individuals."
-
 msgid "Event__assembly__help"
 msgstr "Assembly events are organizeed by an assembly - a pre-registered group of participants."
 
+msgid "Event__sos__help"
+msgstr "Self-organized sessions are organized by individuals."
+
 msgid "Fahrplan"
 msgstr "Schedule"
 
-- 
GitLab