From aa3c0f8eba9b75b3d4206fbcf3fcfc23929ade2f Mon Sep 17 00:00:00 2001 From: l-jonas <43265000+l-jonas@users.noreply.github.com> Date: Fri, 5 Jun 2020 22:01:53 +0200 Subject: Add hide activity option (#11353) * Add hide activity option This closes https://github.com/go-gitea/gitea/issues/7927 * Adjust for linter * Adjust for linter * Add tests * Remove info that admins can view the activity * Adjust new tests for linter * Rename v139.go to v140.go * Rename v140.go to v141.go * properly indent * gofmt Co-authored-by: Jonas Lochmann Co-authored-by: techknowlogick --- templates/user/profile.tmpl | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'templates/user/profile.tmpl') diff --git a/templates/user/profile.tmpl b/templates/user/profile.tmpl index e07b4b0dd8..563bc78307 100644 --- a/templates/user/profile.tmpl +++ b/templates/user/profile.tmpl @@ -104,10 +104,15 @@ {{if eq .TabName "activity"}} - {{if .EnableHeatmap}} - {{template "user/dashboard/heatmap" .}} -
- {{end}} + {{if .Owner.KeepActivityPrivate}} +
+

{{.i18n.Tr "user.disabled_public_activity"}}

+
+ {{end}} + {{if .EnableHeatmap}} + {{template "user/dashboard/heatmap" .}} +
+ {{end}}
{{template "user/dashboard/feeds" .}}
-- cgit v1.2.3