From e8e00b7042cb5bd48e6248fe6469b71f5f95451b Mon Sep 17 00:00:00 2001 From: xoy Date: Sat, 28 Jan 2023 23:15:00 +0100 Subject: [PATCH] fehlerbehebung --- func.go | 6 +++++- web/pages/admin/dashboard.html | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/func.go b/func.go index 20b4f4f..99194bb 100644 --- a/func.go +++ b/func.go @@ -172,7 +172,11 @@ func htmlReplacer(input string, activePage string) string { output = strings.ReplaceAll(output, "!NEWBANNER", htmlNewBanner("Rundgang", "https://www.chaostreff-dortmund.de/rundgang/")) - output = strings.ReplaceAll(output, "!ADMINKEY", activePage) + if strings.Contains(activePage, "/addEvent") { + output = strings.ReplaceAll(output, "!ADMINKEY", activePage) + } else { + output = strings.ReplaceAll(output, "!ADMINKEY", activePage+"/addEvent") + } return output } diff --git a/web/pages/admin/dashboard.html b/web/pages/admin/dashboard.html index 2c6f710..3072070 100644 --- a/web/pages/admin/dashboard.html +++ b/web/pages/admin/dashboard.html @@ -17,7 +17,7 @@ !RAUMSTATUS !EVENTS -
+