Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix display member unit in the menu bar if there are no hidden members in public org #27795

Merged
merged 3 commits into from
Oct 30, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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}}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NumMembers is num or bool

<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