Skip to content

Commit

Permalink
Fix display member unit in the menu bar if there are no hidden member…
Browse files Browse the repository at this point in the history
…s in public org (#27795)

Follow #26363.
I missed that org templates also using
`templates/user/overview/header.tmpl`.
You can confirm this problem in https://gitea.com/gitea/-/projects with
anonymous access.

Before: (no login)

![image](https://github.com/go-gitea/gitea/assets/18380374/e285565c-ca65-4b18-9ff7-434c6367c13a)

After:

![image](https://github.com/go-gitea/gitea/assets/18380374/81e7532a-c458-4552-8d75-6896538e42cb)
  • Loading branch information
yp05327 authored Oct 30, 2023
1 parent c8602a8 commit 0e021cd
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions templates/user/overview/header.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@
{{end}}

{{if .ContextUser.IsOrganization}}
{{if .IsOrganizationMember}}
<a class="item" href="{{$.OrgLink}}/members">
{{if .NumMembers}}
<a class="{{if $.PageIsOrgMembers}}active {{end}}item" href="{{$.OrgLink}}/members">
{{svg "octicon-person"}}&nbsp;{{ctx.Locale.Tr "org.members"}}
{{if .NumMembers}}
<div class="ui small label">{{.NumMembers}}</div>
{{end}}
<div class="ui small label">{{.NumMembers}}</div>
</a>
<a class="item" href="{{$.OrgLink}}/teams">
{{end}}
{{if .IsOrganizationMember}}
<a class="{{if $.PageIsOrgTeams}}active {{end}}item" href="{{$.OrgLink}}/teams">
{{svg "octicon-people"}}&nbsp;{{ctx.Locale.Tr "org.teams"}}
{{if .NumTeams}}
<div class="ui small label">{{.NumTeams}}</div>
Expand Down

0 comments on commit 0e021cd

Please sign in to comment.