aboutsummaryrefslogtreecommitdiffstats
path: root/routers/web
diff options
context:
space:
mode:
authorYarden Shoham <git@yardenshoham.com>2023-04-17 21:26:01 +0300
committerGitHub <noreply@github.com>2023-04-17 14:26:01 -0400
commitf045e58cc7ba076a0ac4b0b5bf0702fa155eaa59 (patch)
tree1df8a5337e1f915e3f8aae79d0c317668cd8b401 /routers/web
parent5eb4c6386709259a9280c5aad6e0488f381144c5 (diff)
downloadgitea-f045e58cc7ba076a0ac4b0b5bf0702fa155eaa59.tar.gz
gitea-f045e58cc7ba076a0ac4b0b5bf0702fa155eaa59.zip
Localize activity heatmap (except tooltip) (#24131)
The calculation of the total sum is moved to the backend so a full HTML string could be sent. ![image](https://user-images.githubusercontent.com/20454870/232112381-c11d896b-ba47-40f8-b2a3-71cf4b3208de.png) - Closes #10669 - 2nd attempt (the first was in #21570) --------- Signed-off-by: Yarden Shoham <git@yardenshoham.com> Co-authored-by: Giteabot <teabot@gitea.io>
Diffstat (limited to 'routers/web')
-rw-r--r--routers/web/user/home.go1
-rw-r--r--routers/web/user/profile.go1
2 files changed, 2 insertions, 0 deletions
diff --git a/routers/web/user/home.go b/routers/web/user/home.go
index a0a5dc3c4b..1f77379044 100644
--- a/routers/web/user/home.go
+++ b/routers/web/user/home.go
@@ -107,6 +107,7 @@ func Dashboard(ctx *context.Context) {
return
}
ctx.Data["HeatmapData"] = data
+ ctx.Data["HeatmapTotalContributions"] = activities_model.GetTotalContributionsInHeatmap(data)
}
feeds, count, err := activities_model.GetFeeds(ctx, activities_model.GetFeedsOptions{
diff --git a/routers/web/user/profile.go b/routers/web/user/profile.go
index d690fa4d01..b39ba58f12 100644
--- a/routers/web/user/profile.go
+++ b/routers/web/user/profile.go
@@ -74,6 +74,7 @@ func Profile(ctx *context.Context) {
return
}
ctx.Data["HeatmapData"] = data
+ ctx.Data["HeatmapTotalContributions"] = activities_model.GetTotalContributionsInHeatmap(data)
}
if len(ctx.ContextUser.Description) != 0 {