Skip to content

Commit c6cc392

Browse files
authored
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)
1 parent a4bcfb8 commit c6cc392

File tree

1 file changed

+15
-13
lines changed

1 file changed

+15
-13
lines changed

templates/user/overview/header.tmpl

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -29,19 +29,21 @@
2929
</a>
3030
{{end}}
3131

32-
<a class="{{if eq .TabName "activity"}}active {{end}}item" href="{{.ContextUser.HomeLink}}?tab=activity">
33-
{{svg "octicon-rss"}} {{ctx.Locale.Tr "user.activity"}}
34-
</a>
35-
{{if not .DisableStars}}
36-
<a class="{{if eq .TabName "stars"}}active {{end}}item" href="{{.ContextUser.HomeLink}}?tab=stars">
37-
{{svg "octicon-star"}} {{ctx.Locale.Tr "user.starred"}}
38-
{{if .ContextUser.NumStars}}
39-
<div class="ui small label">{{.ContextUser.NumStars}}</div>
40-
{{end}}
41-
</a>
42-
{{else}}
43-
<a class="{{if eq .TabName "watching"}}active {{end}}item" href="{{.ContextUser.HomeLink}}?tab=watching">
44-
{{svg "octicon-eye"}} {{ctx.Locale.Tr "user.watched"}}
32+
{{if .ContextUser.IsIndividual}}
33+
<a class="{{if eq .TabName "activity"}}active {{end}}item" href="{{.ContextUser.HomeLink}}?tab=activity">
34+
{{svg "octicon-rss"}} {{ctx.Locale.Tr "user.activity"}}
4535
</a>
36+
{{if not .DisableStars}}
37+
<a class="{{if eq .TabName "stars"}}active {{end}}item" href="{{.ContextUser.HomeLink}}?tab=stars">
38+
{{svg "octicon-star"}} {{ctx.Locale.Tr "user.starred"}}
39+
{{if .ContextUser.NumStars}}
40+
<div class="ui small label">{{.ContextUser.NumStars}}</div>
41+
{{end}}
42+
</a>
43+
{{else}}
44+
<a class="{{if eq .TabName "watching"}}active {{end}}item" href="{{.ContextUser.HomeLink}}?tab=watching">
45+
{{svg "octicon-eye"}} {{ctx.Locale.Tr "user.watched"}}
46+
</a>
47+
{{end}}
4648
{{end}}
4749
</div>

0 commit comments

Comments
 (0)