Let editors define FAQ topics freely instead of a hard-coded map

This commit is contained in:
tleininger committed 2026-09-24 14:49:15 +02:00
1 parent 01d25eb04b
commit c7c55c0c6c
8 files changed
+26 -32

No files matched your search

@@ -14,17 +14,6 @@ public partial class FaqList
ILogger logger,
Exception exception);
// German heading per topic. Unknown topics fall back to the raw key so a new
// topic in PocketBase still shows up rather than being silently dropped.
private static readonly Dictionary<string, string> TopicLabels =
new(StringComparer.Ordinal)
{
["mensa"] = "Mensa und Mittagessen",
["schliessfach"] = "Schließfächer",
["elterneuro"] = "Eltern-Euro",
["elternarbeit"] = "Elternarbeit und Mitmachen",
};
[Inject]
private PocketBaseClient PocketBase { get; set; } = null!;
@@ -57,7 +46,4 @@ public partial class FaqList
SourceUnavailable.SetStatus(HttpContext);
}
}
private static string TopicLabel(string topic)
=> TopicLabels.GetValueOrDefault(topic, topic);
}