aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2024-02-24 15:58:43 +0800
committerGitHub <noreply@github.com>2024-02-24 07:58:43 +0000
commit5043ad54c7a0d1dc6bf5f1caf21b4646ec9344d3 (patch)
treeade0f4a4134222995b3a62370a1bbaa37a80d764 /templates
parent727435743adf35a874d98b482df38cea79005485 (diff)
downloadgitea-5043ad54c7a0d1dc6bf5f1caf21b4646ec9344d3.tar.gz
gitea-5043ad54c7a0d1dc6bf5f1caf21b4646ec9344d3.zip
Fix project counter in organization/individual profile (#28068) (#29361)
Fix #28052 Backport #28068 Before: ![image](https://github.com/go-gitea/gitea/assets/18380374/5f299983-4b38-4d68-ac0e-4be3c62c0558) ![image](https://github.com/go-gitea/gitea/assets/18380374/f0e12afd-483b-4882-80e9-0261beb3fe0c) After: ![image](https://github.com/go-gitea/gitea/assets/18380374/47cccb7b-bb35-4a7d-9c5b-83133be0323a) ![image](https://github.com/go-gitea/gitea/assets/18380374/77825c0c-4bf2-4762-83a2-1a5a173cc22d) Co-authored-by: yp05327 <576951401@qq.com>
Diffstat (limited to 'templates')
-rw-r--r--templates/org/menu.tmpl3
-rw-r--r--templates/user/overview/header.tmpl3
2 files changed, 6 insertions, 0 deletions
diff --git a/templates/org/menu.tmpl b/templates/org/menu.tmpl
index c3ec142e9c..8a97711ce2 100644
--- a/templates/org/menu.tmpl
+++ b/templates/org/menu.tmpl
@@ -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}}
diff --git a/templates/user/overview/header.tmpl b/templates/user/overview/header.tmpl
index 69a4e9a856..e27c9a981e 100644
--- a/templates/user/overview/header.tmpl
+++ b/templates/user/overview/header.tmpl
@@ -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))}}