diff options
author | Yarden Shoham <git@yardenshoham.com> | 2023-04-17 21:26:01 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-17 14:26:01 -0400 |
commit | f045e58cc7ba076a0ac4b0b5bf0702fa155eaa59 (patch) | |
tree | 1df8a5337e1f915e3f8aae79d0c317668cd8b401 /routers/web | |
parent | 5eb4c6386709259a9280c5aad6e0488f381144c5 (diff) | |
download | gitea-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.go | 1 | ||||
-rw-r--r-- | routers/web/user/profile.go | 1 |
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 { |