summaryrefslogtreecommitdiffstats
path: root/templates/user/overview
diff options
context:
space:
mode:
authoryp05327 <576951401@qq.com>2024-03-06 19:23:27 +0900
committerGitHub <noreply@github.com>2024-03-06 10:23:27 +0000
commitc6cc392b55b71ae1787e86e75b7121c3769adcbe (patch)
tree6cb68ad25e247a6733068936e77aa2c734aab6e7 /templates/user/overview
parenta4bcfb8ef1d5b2b522f78c9560d53ddbdbb02218 (diff)
downloadgitea-c6cc392b55b71ae1787e86e75b7121c3769adcbe.tar.gz
gitea-c6cc392b55b71ae1787e86e75b7121c3769adcbe.zip
Fix wrong header of org project view page (#29626)
Follow #29248 The project view page still using `user/overview/header.tmpl` Before: ![image](https://github.com/go-gitea/gitea/assets/18380374/9cb638a3-7cc6-4efa-979a-e2592007fd12) After: ![image](https://github.com/go-gitea/gitea/assets/18380374/62b0b2ea-8cb0-459f-b27a-bad3908eb1c0)
Diffstat (limited to 'templates/user/overview')
-rw-r--r--templates/user/overview/header.tmpl28
1 files changed, 15 insertions, 13 deletions
diff --git a/templates/user/overview/header.tmpl b/templates/user/overview/header.tmpl
index 4fdaa70d87..cf5e21fa62 100644
--- a/templates/user/overview/header.tmpl
+++ b/templates/user/overview/header.tmpl
@@ -29,19 +29,21 @@
</a>
{{end}}
- <a class="{{if eq .TabName "activity"}}active {{end}}item" href="{{.ContextUser.HomeLink}}?tab=activity">
- {{svg "octicon-rss"}} {{ctx.Locale.Tr "user.activity"}}
- </a>
- {{if not .DisableStars}}
- <a class="{{if eq .TabName "stars"}}active {{end}}item" href="{{.ContextUser.HomeLink}}?tab=stars">
- {{svg "octicon-star"}} {{ctx.Locale.Tr "user.starred"}}
- {{if .ContextUser.NumStars}}
- <div class="ui small label">{{.ContextUser.NumStars}}</div>
- {{end}}
- </a>
- {{else}}
- <a class="{{if eq .TabName "watching"}}active {{end}}item" href="{{.ContextUser.HomeLink}}?tab=watching">
- {{svg "octicon-eye"}} {{ctx.Locale.Tr "user.watched"}}
+ {{if .ContextUser.IsIndividual}}
+ <a class="{{if eq .TabName "activity"}}active {{end}}item" href="{{.ContextUser.HomeLink}}?tab=activity">
+ {{svg "octicon-rss"}} {{ctx.Locale.Tr "user.activity"}}
</a>
+ {{if not .DisableStars}}
+ <a class="{{if eq .TabName "stars"}}active {{end}}item" href="{{.ContextUser.HomeLink}}?tab=stars">
+ {{svg "octicon-star"}} {{ctx.Locale.Tr "user.starred"}}
+ {{if .ContextUser.NumStars}}
+ <div class="ui small label">{{.ContextUser.NumStars}}</div>
+ {{end}}
+ </a>
+ {{else}}
+ <a class="{{if eq .TabName "watching"}}active {{end}}item" href="{{.ContextUser.HomeLink}}?tab=watching">
+ {{svg "octicon-eye"}} {{ctx.Locale.Tr "user.watched"}}
+ </a>
+ {{end}}
{{end}}
</div>