summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorl-jonas <43265000+l-jonas@users.noreply.github.com>2020-06-05 22:01:53 +0200
committerGitHub <noreply@github.com>2020-06-05 16:01:53 -0400
commitaa3c0f8eba9b75b3d4206fbcf3fcfc23929ade2f (patch)
treed504c127ed722a93889f954da2799d11c9f148c3 /templates
parentac0741801101d56b6bccd1089ffedf2b3480758b (diff)
downloadgitea-aa3c0f8eba9b75b3d4206fbcf3fcfc23929ade2f.tar.gz
gitea-aa3c0f8eba9b75b3d4206fbcf3fcfc23929ade2f.zip
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 <git@inkompetenz.org> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Diffstat (limited to 'templates')
-rw-r--r--templates/user/profile.tmpl13
-rw-r--r--templates/user/settings/profile.tmpl7
2 files changed, 16 insertions, 4 deletions
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 @@
</div>
{{if eq .TabName "activity"}}
- {{if .EnableHeatmap}}
- {{template "user/dashboard/heatmap" .}}
- <div class="ui divider"></div>
- {{end}}
+ {{if .Owner.KeepActivityPrivate}}
+ <div class="ui info message">
+ <p>{{.i18n.Tr "user.disabled_public_activity"}}</p>
+ </div>
+ {{end}}
+ {{if .EnableHeatmap}}
+ {{template "user/dashboard/heatmap" .}}
+ <div class="ui divider"></div>
+ {{end}}
<div class="feeds">
{{template "user/dashboard/feeds" .}}
</div>
diff --git a/templates/user/settings/profile.tmpl b/templates/user/settings/profile.tmpl
index 995bdfd638..b170c67579 100644
--- a/templates/user/settings/profile.tmpl
+++ b/templates/user/settings/profile.tmpl
@@ -59,6 +59,13 @@
</div>
<div class="field">
+ <label for="keep-activity-private">{{.i18n.Tr "settings.privacy"}}</label>
+ <div class="ui checkbox" id="keep-activity-private">
+ <label class="poping up" data-content="{{.i18n.Tr "settings.keep_activity_private_popup"}}"><strong>{{.i18n.Tr "settings.keep_activity_private"}}</strong></label>
+ <input name="keep_activity_private" type="checkbox" {{if .SignedUser.KeepActivityPrivate}}checked{{end}}>
+ </div>
+ </div>
+ <div class="field">
<button class="ui green button">{{$.i18n.Tr "settings.update_profile"}}</button>
</div>
</form>