From 8fdd3acd376aa1ad0d4259a7d7c9d43a302ac265 Mon Sep 17 00:00:00 2001 From: "Panagiotis \"Ivory\" Vasilopoulos" Date: Sat, 29 Jul 2023 03:01:18 +0200 Subject: [PATCH 01/15] Add OpenStreetMap URL to Location field in profile Not too important, but I think that it'd be a pretty neat touch. Also fixes a previously undiscovered visual bug when zooming in. A separate pull request was not made because adding more elements to the
  • 's makes the problem much more visible. Co-authored-by: Gusted Co-authored-by: Caesar Schinas --- custom/conf/app.example.ini | 3 ++ modules/setting/service.go | 2 + options/locale/locale_en-US.ini | 2 + routers/web/user/profile.go | 1 + templates/shared/user/profile_big_avatar.tmpl | 12 +++++- templates/user/settings/profile.tmpl | 2 +- tests/integration/user_test.go | 40 +++++++++++++++++++ web_src/css/user.css | 5 +++ 8 files changed, 65 insertions(+), 2 deletions(-) diff --git a/custom/conf/app.example.ini b/custom/conf/app.example.ini index e5f72d436c4b0..26ebd54a89f04 100644 --- a/custom/conf/app.example.ini +++ b/custom/conf/app.example.ini @@ -827,6 +827,9 @@ LEVEL = Info ;; Dependencies can be added from any repository where the user is granted access or only from the current repository depending on this setting. ;ALLOW_CROSS_REPOSITORY_DEPENDENCIES = true ;; +;; Enable OpenStreetMap button in Location field on user profiles +;ENABLE_OSM_BUTTON = true +;; ;; Enable heatmap on users profiles. ;ENABLE_USER_HEATMAP = true ;; diff --git a/modules/setting/service.go b/modules/setting/service.go index 597fecee1dcdc..77f3fd2be8550 100644 --- a/modules/setting/service.go +++ b/modules/setting/service.go @@ -73,6 +73,7 @@ var Service = struct { AllowCrossRepositoryDependencies bool DefaultAllowOnlyContributorsToTrackTime bool NoReplyAddress string + EnableOSMButton bool EnableUserHeatmap bool AutoWatchNewRepos bool AutoWatchOnChanges bool @@ -185,6 +186,7 @@ func loadServiceFrom(rootCfg ConfigProvider) { Service.AllowCrossRepositoryDependencies = sec.Key("ALLOW_CROSS_REPOSITORY_DEPENDENCIES").MustBool(true) Service.DefaultAllowOnlyContributorsToTrackTime = sec.Key("DEFAULT_ALLOW_ONLY_CONTRIBUTORS_TO_TRACK_TIME").MustBool(true) Service.NoReplyAddress = sec.Key("NO_REPLY_ADDRESS").MustString("noreply." + Domain) + Service.EnableOSMButton = sec.Key("ENABLE_OSM_BUTTON").MustBool(true) Service.EnableUserHeatmap = sec.Key("ENABLE_USER_HEATMAP").MustBool(true) Service.AutoWatchNewRepos = sec.Key("AUTO_WATCH_NEW_REPOS").MustBool(true) Service.AutoWatchOnChanges = sec.Key("AUTO_WATCH_ON_CHANGES").MustBool(false) diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index cf04830cbb2a2..eeb29e4cd29ed 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -601,6 +601,7 @@ user_bio = Biography disabled_public_activity = This user has disabled the public visibility of the activity. email_visibility.limited = Your email address is visible to all authenticated users email_visibility.private = Your email address is only visible to you and administrators +redirect_to_osm = View on OpenStreetMap form.name_reserved = The username "%s" is reserved. form.name_pattern_not_allowed = The pattern "%s" is not allowed in a username. @@ -627,6 +628,7 @@ webauthn = Security Keys public_profile = Public Profile biography_placeholder = Tell us a little bit about yourself +location_placeholder = Share your approximate location with others profile_desc = Your email address will be used for notifications and other operations. password_username_disabled = Non-local users are not allowed to change their username. Please contact your site administrator for more details. full_name = Full Name diff --git a/routers/web/user/profile.go b/routers/web/user/profile.go index 15a9197b980e8..b08e343ae18b9 100644 --- a/routers/web/user/profile.go +++ b/routers/web/user/profile.go @@ -52,6 +52,7 @@ func userProfile(ctx *context.Context) { ctx.Data["Title"] = ctx.ContextUser.DisplayName() ctx.Data["PageIsUserProfile"] = true + ctx.Data["EnableOSMButton"] = setting.Service.EnableOSMButton // prepare heatmap data if setting.Service.EnableUserHeatmap { diff --git a/templates/shared/user/profile_big_avatar.tmpl b/templates/shared/user/profile_big_avatar.tmpl index 5a1e43b88e351..8397caf1088a6 100644 --- a/templates/shared/user/profile_big_avatar.tmpl +++ b/templates/shared/user/profile_big_avatar.tmpl @@ -24,7 +24,17 @@
      {{if .ContextUser.Location}} -
    • {{svg "octicon-location"}} {{.ContextUser.Location}}
    • +
    • + {{svg "octicon-location"}} + {{.ContextUser.Location}} + {{if .EnableOSMButton}} + + + {{svg "octicon-link-external"}} + + + {{end}} +
    • {{end}} {{if (eq .SignedUserID .ContextUser.ID)}}
    • diff --git a/templates/user/settings/profile.tmpl b/templates/user/settings/profile.tmpl index 9f1f743f9c6db..e0240e391fdce 100644 --- a/templates/user/settings/profile.tmpl +++ b/templates/user/settings/profile.tmpl @@ -35,7 +35,7 @@
    - +
    diff --git a/tests/integration/user_test.go b/tests/integration/user_test.go index 3e4d967686f11..e02fdb62e4534 100644 --- a/tests/integration/user_test.go +++ b/tests/integration/user_test.go @@ -4,6 +4,7 @@ package integration import ( + "fmt" "net/http" "testing" @@ -12,6 +13,7 @@ import ( repo_model "code.gitea.io/gitea/models/repo" "code.gitea.io/gitea/models/unittest" user_model "code.gitea.io/gitea/models/user" + "code.gitea.io/gitea/modules/setting" api "code.gitea.io/gitea/modules/structs" "code.gitea.io/gitea/modules/test" "code.gitea.io/gitea/modules/translation" @@ -276,3 +278,41 @@ func TestListStopWatches(t *testing.T) { assert.Greater(t, apiWatches[0].Seconds, int64(0)) } } + +func TestGetOpenStreetMapLink(t *testing.T) { + setting.Service.EnableOSMButton = true + defer tests.PrepareTestEnv(t)() + + testLocations := map[string]string{ + "Αθήνα": "%ce%91%ce%b8%ce%ae%ce%bd%ce%b1", + " Αθήνα": "%20%20%ce%91%ce%b8%ce%ae%ce%bd%ce%b1", + "Barbarossabrunnen, Düsseldorf": "Barbarossabrunnen%2c%20D%c3%bcsseldorf", + "39.91025,116.40753": "39.91025%2c116.40753", + "པེ་ཅིང་གྲོང་ཁྱེར།": "%e0%bd%94%e0%bd%ba%e0%bc%8b%e0%bd%85%e0%bd%b2%e0%bd%84%e0%bc%8b%e0%bd%82%e0%be%b2%e0%bd%bc%e0%bd%84%e0%bc%8b%e0%bd%81%e0%be%b1%e0%bd%ba%e0%bd%a2%e0%bc%8d", + "Internet Archive": "Internet%20Archive", + "Schönhauser Allee 2, Berlin, Deutschland": "Sch%c3%b6nhauser%20Allee%202%2c%20Berlin%2c%20Deutschland", + "Miestna knižnica Podunajské Biskupice": "Miestna%20kni%c5%benica%20Podunajsk%c3%a9%20Biskupice", + "東京タワー": "%e6%9d%b1%e4%ba%ac%e3%82%bf%e3%83%af%e3%83%bc", + "Carnarvon Space & Technology Centre": "Carnarvon%20Space%20%26%20Technology%20Centre", + } + + session := loginUser(t, "user2") + for location, encodedLocation := range testLocations { + t.Run(location, func(t *testing.T) { + req := NewRequestWithValues(t, "POST", "/user/settings", map[string]string{ + "_csrf": GetCSRF(t, session, "/user/settings"), + "name": "user2", + "email": "user@example.com", + "language": "en-US", + "location": location, + }) + session.MakeRequest(t, req, http.StatusSeeOther) + + req = NewRequest(t, "GET", "/user2/") + resp := session.MakeRequest(t, req, http.StatusOK) + htmlDoc := NewHTMLParser(t, resp.Body) + + htmlDoc.AssertElement(t, fmt.Sprintf("a[href='https://www.openstreetmap.org/search?query=%s']", encodedLocation), true) + }) + } +} diff --git a/web_src/css/user.css b/web_src/css/user.css index 9fcdb3814aaad..e8e4521a9b495 100644 --- a/web_src/css/user.css +++ b/web_src/css/user.css @@ -26,9 +26,14 @@ } .user.profile .ui.card .extra.content > ul > li:not(:last-child) { + display: flex; border-bottom: 1px solid var(--color-secondary); } +.user.profile .ui.card .extra.content > ul > li:not(:last-child) > :nth-child(2) { + flex-grow: 1; +} + .user.profile .ui.card .extra.content > ul > li .svg { margin-left: 1px; margin-right: 5px; From 560cc47570989336429ce4fe8515122d32f66a80 Mon Sep 17 00:00:00 2001 From: "Panagiotis \"Ivory\" Vasilopoulos" Date: Sat, 29 Jul 2023 03:38:16 +0200 Subject: [PATCH 02/15] Fix small indentation error in CSS --- web_src/css/user.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web_src/css/user.css b/web_src/css/user.css index e8e4521a9b495..76eff532b5027 100644 --- a/web_src/css/user.css +++ b/web_src/css/user.css @@ -31,7 +31,7 @@ } .user.profile .ui.card .extra.content > ul > li:not(:last-child) > :nth-child(2) { - flex-grow: 1; + flex-grow: 1; } .user.profile .ui.card .extra.content > ul > li .svg { From 38335016866af6a8dc7253a877ff8c8816a1624f Mon Sep 17 00:00:00 2001 From: "Panagiotis \"Ivory\" Vasilopoulos" Date: Sat, 29 Jul 2023 11:55:44 +0200 Subject: [PATCH 03/15] Address comments by wxiaoguang There is still one outstanding issue. --- tests/integration/user_test.go | 38 ---------------------------------- 1 file changed, 38 deletions(-) diff --git a/tests/integration/user_test.go b/tests/integration/user_test.go index e02fdb62e4534..3f6d5318464a8 100644 --- a/tests/integration/user_test.go +++ b/tests/integration/user_test.go @@ -278,41 +278,3 @@ func TestListStopWatches(t *testing.T) { assert.Greater(t, apiWatches[0].Seconds, int64(0)) } } - -func TestGetOpenStreetMapLink(t *testing.T) { - setting.Service.EnableOSMButton = true - defer tests.PrepareTestEnv(t)() - - testLocations := map[string]string{ - "Αθήνα": "%ce%91%ce%b8%ce%ae%ce%bd%ce%b1", - " Αθήνα": "%20%20%ce%91%ce%b8%ce%ae%ce%bd%ce%b1", - "Barbarossabrunnen, Düsseldorf": "Barbarossabrunnen%2c%20D%c3%bcsseldorf", - "39.91025,116.40753": "39.91025%2c116.40753", - "པེ་ཅིང་གྲོང་ཁྱེར།": "%e0%bd%94%e0%bd%ba%e0%bc%8b%e0%bd%85%e0%bd%b2%e0%bd%84%e0%bc%8b%e0%bd%82%e0%be%b2%e0%bd%bc%e0%bd%84%e0%bc%8b%e0%bd%81%e0%be%b1%e0%bd%ba%e0%bd%a2%e0%bc%8d", - "Internet Archive": "Internet%20Archive", - "Schönhauser Allee 2, Berlin, Deutschland": "Sch%c3%b6nhauser%20Allee%202%2c%20Berlin%2c%20Deutschland", - "Miestna knižnica Podunajské Biskupice": "Miestna%20kni%c5%benica%20Podunajsk%c3%a9%20Biskupice", - "東京タワー": "%e6%9d%b1%e4%ba%ac%e3%82%bf%e3%83%af%e3%83%bc", - "Carnarvon Space & Technology Centre": "Carnarvon%20Space%20%26%20Technology%20Centre", - } - - session := loginUser(t, "user2") - for location, encodedLocation := range testLocations { - t.Run(location, func(t *testing.T) { - req := NewRequestWithValues(t, "POST", "/user/settings", map[string]string{ - "_csrf": GetCSRF(t, session, "/user/settings"), - "name": "user2", - "email": "user@example.com", - "language": "en-US", - "location": location, - }) - session.MakeRequest(t, req, http.StatusSeeOther) - - req = NewRequest(t, "GET", "/user2/") - resp := session.MakeRequest(t, req, http.StatusOK) - htmlDoc := NewHTMLParser(t, resp.Body) - - htmlDoc.AssertElement(t, fmt.Sprintf("a[href='https://www.openstreetmap.org/search?query=%s']", encodedLocation), true) - }) - } -} From 8d77d741ef84c4a45593b463cecdbf940169361b Mon Sep 17 00:00:00 2001 From: "Panagiotis \"Ivory\" Vasilopoulos" Date: Sun, 30 Jul 2023 13:52:49 +0200 Subject: [PATCH 04/15] Oops, I actually forgot to push the changes. --- custom/conf/app.example.ini | 8 ++++++-- modules/setting/service.go | 6 ++++-- routers/web/user/profile.go | 3 ++- templates/shared/user/profile_big_avatar.tmpl | 6 ++++-- 4 files changed, 16 insertions(+), 7 deletions(-) diff --git a/custom/conf/app.example.ini b/custom/conf/app.example.ini index 26ebd54a89f04..9533243e11f69 100644 --- a/custom/conf/app.example.ini +++ b/custom/conf/app.example.ini @@ -827,8 +827,12 @@ LEVEL = Info ;; Dependencies can be added from any repository where the user is granted access or only from the current repository depending on this setting. ;ALLOW_CROSS_REPOSITORY_DEPENDENCIES = true ;; -;; Enable OpenStreetMap button in Location field on user profiles -;ENABLE_OSM_BUTTON = true +;; Enable button that redirects users to a map service based on the input in Location field +;ENABLE_LOCATION_BUTTON = true +;; +;; Default service used for maps +;; Only relevant if ENABLE_LOCATION_BUTTON is enabled +; LOCATION_QUERY_URL = https://www.openstreetmap.org/search?query= ;; ;; Enable heatmap on users profiles. ;ENABLE_USER_HEATMAP = true diff --git a/modules/setting/service.go b/modules/setting/service.go index 77f3fd2be8550..a86e6fe35be27 100644 --- a/modules/setting/service.go +++ b/modules/setting/service.go @@ -73,7 +73,8 @@ var Service = struct { AllowCrossRepositoryDependencies bool DefaultAllowOnlyContributorsToTrackTime bool NoReplyAddress string - EnableOSMButton bool + EnableLocationButton bool + LocationQueryURL string EnableUserHeatmap bool AutoWatchNewRepos bool AutoWatchOnChanges bool @@ -186,7 +187,8 @@ func loadServiceFrom(rootCfg ConfigProvider) { Service.AllowCrossRepositoryDependencies = sec.Key("ALLOW_CROSS_REPOSITORY_DEPENDENCIES").MustBool(true) Service.DefaultAllowOnlyContributorsToTrackTime = sec.Key("DEFAULT_ALLOW_ONLY_CONTRIBUTORS_TO_TRACK_TIME").MustBool(true) Service.NoReplyAddress = sec.Key("NO_REPLY_ADDRESS").MustString("noreply." + Domain) - Service.EnableOSMButton = sec.Key("ENABLE_OSM_BUTTON").MustBool(true) + Service.EnableLocationButton = sec.Key("ENABLE_OSM_BUTTON").MustBool(true) + Service.LocationQueryURL = sec.Key("LOCATION_QUERY_URL").MustString("https://www.openstreetmap.org/search?query=") Service.EnableUserHeatmap = sec.Key("ENABLE_USER_HEATMAP").MustBool(true) Service.AutoWatchNewRepos = sec.Key("AUTO_WATCH_NEW_REPOS").MustBool(true) Service.AutoWatchOnChanges = sec.Key("AUTO_WATCH_ON_CHANGES").MustBool(false) diff --git a/routers/web/user/profile.go b/routers/web/user/profile.go index b08e343ae18b9..546df459f7d5d 100644 --- a/routers/web/user/profile.go +++ b/routers/web/user/profile.go @@ -52,7 +52,8 @@ func userProfile(ctx *context.Context) { ctx.Data["Title"] = ctx.ContextUser.DisplayName() ctx.Data["PageIsUserProfile"] = true - ctx.Data["EnableOSMButton"] = setting.Service.EnableOSMButton + ctx.Data["EnableLocationButton"] = setting.Service.EnableLocationButton + ctx.Data["LocationQueryURL"] = setting.Service.LocationQueryURL // prepare heatmap data if setting.Service.EnableUserHeatmap { diff --git a/templates/shared/user/profile_big_avatar.tmpl b/templates/shared/user/profile_big_avatar.tmpl index 8397caf1088a6..1813dda0ad082 100644 --- a/templates/shared/user/profile_big_avatar.tmpl +++ b/templates/shared/user/profile_big_avatar.tmpl @@ -27,8 +27,10 @@
  • {{svg "octicon-location"}} {{.ContextUser.Location}} - {{if .EnableOSMButton}} - + {{/* Checking whether .LocationQueryURL is empty is arguably excessive, but makes this functionality foolproof */}} + {{if and .EnableLocationButton .LocationQueryURL}} + {{/* We presume that the LocationQueryURL is safe, as it is provided by the site administrator. */}} + {{svg "octicon-link-external"}} From 45542223e3080080ebcf27b3cbe82c6ca0245c30 Mon Sep 17 00:00:00 2001 From: "Panagiotis \"Ivory\" Vasilopoulos" Date: Sun, 30 Jul 2023 13:59:52 +0200 Subject: [PATCH 05/15] Improve tips in app.example.ini --- custom/conf/app.example.ini | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/custom/conf/app.example.ini b/custom/conf/app.example.ini index 9533243e11f69..a1eca4504a9af 100644 --- a/custom/conf/app.example.ini +++ b/custom/conf/app.example.ini @@ -827,11 +827,15 @@ LEVEL = Info ;; Dependencies can be added from any repository where the user is granted access or only from the current repository depending on this setting. ;ALLOW_CROSS_REPOSITORY_DEPENDENCIES = true ;; -;; Enable button that redirects users to a map service based on the input in Location field +;; Enable button that redirects users to a map service in Location fields on profiles ;ENABLE_LOCATION_BUTTON = true ;; -;; Default service used for maps -;; Only relevant if ENABLE_LOCATION_BUTTON is enabled +;; Default map service. No external API support has been included. A service has to allow +;; searching using URL parameters. Only relevant if ENABLE_LOCATION_BUTTON is enabled. +;; Some examples are: +;; - https://www.google.com/maps/place/ +;; - https://www.mapquest.com/search/ +;; - https://www.bing.com/maps?where1= ; LOCATION_QUERY_URL = https://www.openstreetmap.org/search?query= ;; ;; Enable heatmap on users profiles. From 5b79191000621aa6517be6c2d200b308aed8032b Mon Sep 17 00:00:00 2001 From: "Panagiotis \"Ivory\" Vasilopoulos" Date: Sun, 30 Jul 2023 14:03:07 +0200 Subject: [PATCH 06/15] Okay, I mixed up the spaces and the tabs, oops --- modules/setting/service.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/setting/service.go b/modules/setting/service.go index a86e6fe35be27..01899687fce88 100644 --- a/modules/setting/service.go +++ b/modules/setting/service.go @@ -74,7 +74,7 @@ var Service = struct { DefaultAllowOnlyContributorsToTrackTime bool NoReplyAddress string EnableLocationButton bool - LocationQueryURL string + LocationQueryURL string EnableUserHeatmap bool AutoWatchNewRepos bool AutoWatchOnChanges bool From e35e391f482dc980df78cea2642ff9f033fd76cd Mon Sep 17 00:00:00 2001 From: "Panagiotis \"Ivory\" Vasilopoulos" Date: Sun, 30 Jul 2023 14:45:12 +0200 Subject: [PATCH 07/15] Address comments, use for 'Joined on' --- custom/conf/app.example.ini | 7 ++----- modules/setting/service.go | 6 ++---- routers/web/user/profile.go | 3 +-- templates/shared/user/profile_big_avatar.tmpl | 9 ++++----- 4 files changed, 9 insertions(+), 16 deletions(-) diff --git a/custom/conf/app.example.ini b/custom/conf/app.example.ini index a1eca4504a9af..0c513d17b3a85 100644 --- a/custom/conf/app.example.ini +++ b/custom/conf/app.example.ini @@ -827,16 +827,13 @@ LEVEL = Info ;; Dependencies can be added from any repository where the user is granted access or only from the current repository depending on this setting. ;ALLOW_CROSS_REPOSITORY_DEPENDENCIES = true ;; -;; Enable button that redirects users to a map service in Location fields on profiles -;ENABLE_LOCATION_BUTTON = true -;; ;; Default map service. No external API support has been included. A service has to allow -;; searching using URL parameters. Only relevant if ENABLE_LOCATION_BUTTON is enabled. +;; searching using URL parameters. Uncomment this option and leave it empty to disable this. ;; Some examples are: ;; - https://www.google.com/maps/place/ ;; - https://www.mapquest.com/search/ ;; - https://www.bing.com/maps?where1= -; LOCATION_QUERY_URL = https://www.openstreetmap.org/search?query= +; USER_LOCATION_QUERY_URL = https://www.openstreetmap.org/search?query= ;; ;; Enable heatmap on users profiles. ;ENABLE_USER_HEATMAP = true diff --git a/modules/setting/service.go b/modules/setting/service.go index 01899687fce88..f1b415ef70acf 100644 --- a/modules/setting/service.go +++ b/modules/setting/service.go @@ -73,8 +73,7 @@ var Service = struct { AllowCrossRepositoryDependencies bool DefaultAllowOnlyContributorsToTrackTime bool NoReplyAddress string - EnableLocationButton bool - LocationQueryURL string + UserLocationMapURL string EnableUserHeatmap bool AutoWatchNewRepos bool AutoWatchOnChanges bool @@ -187,8 +186,7 @@ func loadServiceFrom(rootCfg ConfigProvider) { Service.AllowCrossRepositoryDependencies = sec.Key("ALLOW_CROSS_REPOSITORY_DEPENDENCIES").MustBool(true) Service.DefaultAllowOnlyContributorsToTrackTime = sec.Key("DEFAULT_ALLOW_ONLY_CONTRIBUTORS_TO_TRACK_TIME").MustBool(true) Service.NoReplyAddress = sec.Key("NO_REPLY_ADDRESS").MustString("noreply." + Domain) - Service.EnableLocationButton = sec.Key("ENABLE_OSM_BUTTON").MustBool(true) - Service.LocationQueryURL = sec.Key("LOCATION_QUERY_URL").MustString("https://www.openstreetmap.org/search?query=") + Service.UserLocationMapURL = sec.Key("USER_LOCATION_MAP_URL").MustString("https://www.openstreetmap.org/search?query=") Service.EnableUserHeatmap = sec.Key("ENABLE_USER_HEATMAP").MustBool(true) Service.AutoWatchNewRepos = sec.Key("AUTO_WATCH_NEW_REPOS").MustBool(true) Service.AutoWatchOnChanges = sec.Key("AUTO_WATCH_ON_CHANGES").MustBool(false) diff --git a/routers/web/user/profile.go b/routers/web/user/profile.go index 546df459f7d5d..7f6e41d30f264 100644 --- a/routers/web/user/profile.go +++ b/routers/web/user/profile.go @@ -52,8 +52,7 @@ func userProfile(ctx *context.Context) { ctx.Data["Title"] = ctx.ContextUser.DisplayName() ctx.Data["PageIsUserProfile"] = true - ctx.Data["EnableLocationButton"] = setting.Service.EnableLocationButton - ctx.Data["LocationQueryURL"] = setting.Service.LocationQueryURL + ctx.Data["UserLocationMapURL"] = setting.Service.UserLocationMapURL // prepare heatmap data if setting.Service.EnableUserHeatmap { diff --git a/templates/shared/user/profile_big_avatar.tmpl b/templates/shared/user/profile_big_avatar.tmpl index 1813dda0ad082..af10cc38f8c9a 100644 --- a/templates/shared/user/profile_big_avatar.tmpl +++ b/templates/shared/user/profile_big_avatar.tmpl @@ -27,10 +27,9 @@
  • {{svg "octicon-location"}} {{.ContextUser.Location}} - {{/* Checking whether .LocationQueryURL is empty is arguably excessive, but makes this functionality foolproof */}} - {{if and .EnableLocationButton .LocationQueryURL}} - {{/* We presume that the LocationQueryURL is safe, as it is provided by the site administrator. */}} - + {{if .UserLocationMapURL}} + {{/* We presume that the UserLocationMapURL is safe, as it is provided by the site administrator. */}} + {{svg "octicon-link-external"}} @@ -81,7 +80,7 @@
  • {{end}} {{end}} -
  • {{svg "octicon-clock"}} {{.locale.Tr "user.joined_on" (DateTime "short" .ContextUser.CreatedUnix) | Safe}}
  • +
  • {{svg "octicon-clock"}} {{.locale.Tr "user.joined_on" (DateTime "short" .ContextUser.CreatedUnix) | Safe}}
  • {{if and .Orgs .HasOrgsVisible}}