From 4be6e89298c1e5ae10909ff20ace62749b190159 Mon Sep 17 00:00:00 2001 From: Asaf Gartner Date: Sun, 7 Jul 2024 13:23:40 +0300 Subject: [PATCH] Added admin approval queue to user dropdown for admins --- src/templates/src/include/header-2024.html | 3 +++ src/templates/types.go | 12 ++++++------ src/website/base_data.go | 10 +++++----- 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/src/templates/src/include/header-2024.html b/src/templates/src/include/header-2024.html index cb04e9cb..11ed3f9f 100644 --- a/src/templates/src/include/header-2024.html +++ b/src/templates/src/include/header-2024.html @@ -65,6 +65,9 @@ diff --git a/src/templates/types.go b/src/templates/types.go index 332a6669..ba4a455a 100644 --- a/src/templates/types.go +++ b/src/templates/types.go @@ -40,12 +40,12 @@ func (bd *BaseData) AddImmediateNotice(class, content string) { } type Header struct { - AdminUrl string - UserProfileUrl string - UserSettingsUrl string - LogoutUrl string - ForgotPasswordUrl string - RegisterUrl string + AdminApprovalQueueUrl string + UserProfileUrl string + UserSettingsUrl string + LogoutUrl string + ForgotPasswordUrl string + RegisterUrl string HMNHomepageUrl string ProjectIndexUrl string diff --git a/src/website/base_data.go b/src/website/base_data.go index d8462397..d72604d4 100644 --- a/src/website/base_data.go +++ b/src/website/base_data.go @@ -81,11 +81,11 @@ func getBaseData(c *RequestContext, title string, breadcrumbs []templates.Breadc IsProjectPage: !project.IsHMN(), Header: templates.Header{ - AdminUrl: hmnurl.BuildAdminApprovalQueue(), // TODO(asaf): Replace with general-purpose admin page - UserSettingsUrl: hmnurl.BuildUserSettings(""), - LogoutUrl: hmnurl.BuildLogoutAction(c.FullUrl()), - ForgotPasswordUrl: hmnurl.BuildRequestPasswordReset(), - RegisterUrl: hmnurl.BuildRegister(""), + AdminApprovalQueueUrl: hmnurl.BuildAdminApprovalQueue(), // TODO(asaf): Replace with general-purpose admin page + UserSettingsUrl: hmnurl.BuildUserSettings(""), + LogoutUrl: hmnurl.BuildLogoutAction(c.FullUrl()), + ForgotPasswordUrl: hmnurl.BuildRequestPasswordReset(), + RegisterUrl: hmnurl.BuildRegister(""), HMNHomepageUrl: hmnurl.BuildHomepage(), ProjectIndexUrl: hmnurl.BuildProjectIndex(),