summaryrefslogtreecommitdiffstats
path: root/templates/org
diff options
context:
space:
mode:
authorJakob <72307968+jakob30061@users.noreply.github.com>2023-04-19 20:58:36 +0200
committerGitHub <noreply@github.com>2023-04-19 14:58:36 -0400
commit52b17bfa07fea29441cd961da4edaf1ea97fe348 (patch)
tree287a5db3177790cf6e4a7762bcc0487779e18504 /templates/org
parenteed6b28fc0924ce394ee3913ed0973c44a525c20 (diff)
downloadgitea-52b17bfa07fea29441cd961da4edaf1ea97fe348.tar.gz
gitea-52b17bfa07fea29441cd961da4edaf1ea97fe348.zip
Add repository counter badge to repository tab (#24205)
Add a new badge to the repository tab for users and organizations. The badge is only visible if a repo exists. Change the badge color of existing "Starred Repositories". (from primary to small) Closes #24188
Diffstat (limited to 'templates/org')
-rw-r--r--templates/org/menu.tmpl7
1 files changed, 5 insertions, 2 deletions
diff --git a/templates/org/menu.tmpl b/templates/org/menu.tmpl
index 2a359d8111..39189b0c84 100644
--- a/templates/org/menu.tmpl
+++ b/templates/org/menu.tmpl
@@ -2,6 +2,9 @@
<div class="ui secondary stackable pointing menu">
<a class="{{if .PageIsViewRepositories}}active {{end}}item" href="{{$.Org.HomeLink}}">
{{svg "octicon-repo"}} {{.locale.Tr "user.repositories"}}
+ {{if .Owner.NumRepos}}
+ <div class="ui small label">{{.Owner.NumRepos}}</div>
+ {{end}}
</a>
{{if and .IsProjectEnabled .CanReadProjects}}
<a class="{{if .PageIsViewProjects}}active {{end}}item" href="{{$.Org.HomeLink}}/-/projects">
@@ -22,13 +25,13 @@
<a class="{{if $.PageIsOrgMembers}}active {{end}}item" href="{{$.OrgLink}}/members">
{{svg "octicon-person"}}&nbsp;{{$.locale.Tr "org.members"}}
{{if .NumMembers}}
- <div class="ui primary label">{{.NumMembers}}</div>
+ <div class="ui small label">{{.NumMembers}}</div>
{{end}}
</a>
<a class="{{if $.PageIsOrgTeams}}active {{end}}item" href="{{$.OrgLink}}/teams">
{{svg "octicon-people"}}&nbsp;{{$.locale.Tr "org.teams"}}
{{if .NumTeams}}
- <div class="ui primary label">{{.NumTeams}}</div>
+ <div class="ui small label">{{.NumTeams}}</div>
{{end}}
</a>
{{end}}