From c72f726a41fea66e96aa6aafb342288f8f68c8d2 Mon Sep 17 00:00:00 2001 From: "Panagiotis \"Ivory\" Vasilopoulos" Date: Mon, 25 Sep 2023 17:52:38 +0200 Subject: [PATCH] Move UserLocationMapURL to PrepareContextForProfileBigAvatar This fixes an issue where the location map icon is not shown when viewing a user's Projects or Packages. Co-authored-by: Gusted --- routers/web/shared/user/header.go | 1 + routers/web/user/profile.go | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/routers/web/shared/user/header.go b/routers/web/shared/user/header.go index 9b1918ed16b48..ee112d0160cb4 100644 --- a/routers/web/shared/user/header.go +++ b/routers/web/shared/user/header.go @@ -33,6 +33,7 @@ func PrepareContextForProfileBigAvatar(ctx *context.Context) { ctx.Data["IsFollowing"] = ctx.Doer != nil && user_model.IsFollowing(ctx.Doer.ID, ctx.ContextUser.ID) ctx.Data["ShowUserEmail"] = setting.UI.ShowUserEmail && ctx.ContextUser.Email != "" && ctx.IsSigned && !ctx.ContextUser.KeepEmailPrivate + ctx.Data["UserLocationMapURL"] = setting.Service.UserLocationMapURL // Show OpenID URIs openIDs, err := user_model.GetUserOpenIDs(ctx.ContextUser.ID) diff --git a/routers/web/user/profile.go b/routers/web/user/profile.go index 87505b94b19c7..d20ebe0ec5838 100644 --- a/routers/web/user/profile.go +++ b/routers/web/user/profile.go @@ -52,7 +52,6 @@ func userProfile(ctx *context.Context) { ctx.Data["Title"] = ctx.ContextUser.DisplayName() ctx.Data["PageIsUserProfile"] = true - ctx.Data["UserLocationMapURL"] = setting.Service.UserLocationMapURL // prepare heatmap data if setting.Service.EnableUserHeatmap {