From ee4443c9982a5953d5c5a39e68b700f156bde1af Mon Sep 17 00:00:00 2001 From: yp05327 <576951401@qq.com> Date: Wed, 6 Mar 2024 19:23:27 +0900 Subject: [PATCH] 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) (cherry picked from commit c6cc392b55b71ae1787e86e75b7121c3769adcbe) --- templates/user/overview/header.tmpl | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/templates/user/overview/header.tmpl b/templates/user/overview/header.tmpl index 4fdaa70d8..cf5e21fa6 100644 --- a/templates/user/overview/header.tmpl +++ b/templates/user/overview/header.tmpl @@ -29,19 +29,21 @@ {{end}} - - {{svg "octicon-rss"}} {{ctx.Locale.Tr "user.activity"}} - - {{if not .DisableStars}} - - {{svg "octicon-star"}} {{ctx.Locale.Tr "user.starred"}} - {{if .ContextUser.NumStars}} -
{{.ContextUser.NumStars}}
- {{end}} -
- {{else}} - - {{svg "octicon-eye"}} {{ctx.Locale.Tr "user.watched"}} + {{if .ContextUser.IsIndividual}} + + {{svg "octicon-rss"}} {{ctx.Locale.Tr "user.activity"}} + {{if not .DisableStars}} + + {{svg "octicon-star"}} {{ctx.Locale.Tr "user.starred"}} + {{if .ContextUser.NumStars}} +
{{.ContextUser.NumStars}}
+ {{end}} +
+ {{else}} + + {{svg "octicon-eye"}} {{ctx.Locale.Tr "user.watched"}} + + {{end}} {{end}}