Fix project counter in organization/individual profile (#28068)

Fix #28052
Before:

![image](5f299983-4b38-4d68-ac0e-4be3c62c0558)

![image](f0e12afd-483b-4882-80e9-0261beb3fe0c)

After:

![image](47cccb7b-bb35-4a7d-9c5b-83133be0323a)

![image](77825c0c-4bf2-4762-83a2-1a5a173cc22d)
This commit is contained in:
yp05327 2023-11-18 12:02:42 +09:00 committed by GitHub
parent e31c6cfe6e
commit e88377470a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 23 additions and 0 deletions

View file

@ -9,6 +9,9 @@
{{if .CanReadProjects}}
<a class="{{if .PageIsViewProjects}}active {{end}}item" href="{{$.Org.HomeLink}}/-/projects">
{{svg "octicon-project-symlink"}} {{ctx.Locale.Tr "user.projects"}}
{{if .ProjectCount}}
<div class="ui small label">{{.ProjectCount}}</div>
{{end}}
</a>
{{end}}
{{if and .IsPackageEnabled .CanReadPackages}}

View file

@ -13,6 +13,9 @@
{{if or .ContextUser.IsIndividual (and .ContextUser.IsOrganization .CanReadProjects)}}
<a href="{{.ContextUser.HomeLink}}/-/projects" class="{{if .PageIsViewProjects}}active {{end}}item">
{{svg "octicon-project-symlink"}} {{ctx.Locale.Tr "user.projects"}}
{{if .ProjectCount}}
<div class="ui small label">{{.ProjectCount}}</div>
{{end}}
</a>
{{end}}
{{if and .IsPackageEnabled (or .ContextUser.IsIndividual (and .ContextUser.IsOrganization .CanReadPackages))}}