Fix display member unit in the menu bar if there are no hidden members 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)
pull/27815/head^2
yp05327 1 year ago committed by GitHub
parent c8602a8dfa
commit 0e021cd33e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 12
      templates/user/overview/header.tmpl

@ -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>

Loading…
Cancel
Save