aboutsummaryrefslogtreecommitdiffstats
path: root/templates/user
diff options
context:
space:
mode:
authorKyle D <kdumontnu@gmail.com>2021-04-15 10:53:57 -0600
committerGitHub <noreply@github.com>2021-04-15 18:53:57 +0200
commitf44543a1bb776fa8bdfd3b605d67197d1466eb20 (patch)
treeb9a014285b40c3eb45dd90bcafa7ccc17c1031d8 /templates/user
parentaf2adb4e35ea71ca5c7fbb1e51b9d25fe49af2e4 (diff)
downloadgitea-f44543a1bb776fa8bdfd3b605d67197d1466eb20.tar.gz
gitea-f44543a1bb776fa8bdfd3b605d67197d1466eb20.zip
Disable Stars config option (#14653)
* Add config option to disable stars * Replace "stars" with watched in user profile * Add documentation
Diffstat (limited to 'templates/user')
-rw-r--r--templates/user/dashboard/repolist.tmpl10
-rw-r--r--templates/user/profile.tmpl16
2 files changed, 17 insertions, 9 deletions
diff --git a/templates/user/dashboard/repolist.tmpl b/templates/user/dashboard/repolist.tmpl
index 9dfda9d84e..8ac07e1df6 100644
--- a/templates/user/dashboard/repolist.tmpl
+++ b/templates/user/dashboard/repolist.tmpl
@@ -130,10 +130,12 @@
{{svg "octicon-archive" 16 "ml-2"}}
</span>
</div>
- <div class="text light grey df ac">
- ${repo.stars_count}
- {{svg "octicon-star" 16 "ml-2"}}
- </div>
+ {{if not .DisableStars}}
+ <div class="text light grey df ac">
+ ${repo.stars_count}
+ {{svg "octicon-star" 16 "ml-2"}}
+ </div>
+ {{end}}
</a>
</li>
</ul>
diff --git a/templates/user/profile.tmpl b/templates/user/profile.tmpl
index ddad4c46c3..18f3c9f6dd 100644
--- a/templates/user/profile.tmpl
+++ b/templates/user/profile.tmpl
@@ -84,16 +84,22 @@
</div>
<div class="ui eleven wide column">
<div class="ui secondary stackable pointing tight menu">
- <a class='{{if and (ne .TabName "activity") (ne .TabName "following") (ne .TabName "followers") (ne .TabName "stars") (ne .TabName "projects")}}active{{end}} item' href="{{.Owner.HomeLink}}">
+ <a class='{{if and (ne .TabName "activity") (ne .TabName "following") (ne .TabName "followers") (ne .TabName "stars") (ne .TabName "watching") (ne .TabName "projects")}}active{{end}} item' href="{{.Owner.HomeLink}}">
{{svg "octicon-repo"}} {{.i18n.Tr "user.repositories"}}
</a>
<a class='{{if eq .TabName "activity"}}active{{end}} item' href="{{.Owner.HomeLink}}?tab=activity">
{{svg "octicon-rss"}} {{.i18n.Tr "user.activity"}}
</a>
- <a class='{{if eq .TabName "stars"}}active{{end}} item' href="{{.Owner.HomeLink}}?tab=stars">
- {{svg "octicon-star"}} {{.i18n.Tr "user.starred"}}
- <div class="ui label">{{.Owner.NumStars}}</div>
- </a>
+ {{if not .DisableStars}}
+ <a class='{{if eq .TabName "stars"}}active{{end}} item' href="{{.Owner.HomeLink}}?tab=stars">
+ {{svg "octicon-star"}} {{.i18n.Tr "user.starred"}}
+ <div class="ui label">{{.Owner.NumStars}}</div>
+ </a>
+ {{else}}
+ <a class='{{if eq .TabName "watching"}}active{{end}} item' href="{{.Owner.HomeLink}}?tab=watching">
+ {{svg "octicon-eye"}} {{.i18n.Tr "user.watched"}}
+ </a>
+ {{end}}
<a class='{{if eq .TabName "following"}}active{{end}} item' href="{{.Owner.HomeLink}}?tab=following">
{{svg "octicon-person"}} {{.i18n.Tr "user.following"}}
<div class="ui label">{{.Owner.NumFollowing}}</div>