mirror of
https://github.com/go-gitea/gitea
synced 2024-11-14 01:35:54 +01:00
52b17bfa07
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
48 lines
1.7 KiB
Handlebars
48 lines
1.7 KiB
Handlebars
<div class="ui tabs container">
|
|
<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">
|
|
{{svg "octicon-project-symlink"}} {{.locale.Tr "user.projects"}}
|
|
</a>
|
|
{{end}}
|
|
{{if and .IsPackageEnabled .CanReadPackages}}
|
|
<a class="item" href="{{$.Org.HomeLink}}/-/packages">
|
|
{{svg "octicon-package"}} {{.locale.Tr "packages.title"}}
|
|
</a>
|
|
{{end}}
|
|
{{if and .IsRepoIndexerEnabled .CanReadCode}}
|
|
<a class="item" href="{{$.Org.HomeLink}}/-/code">
|
|
{{svg "octicon-code"}} {{$.locale.Tr "org.code"}}
|
|
</a>
|
|
{{end}}
|
|
{{if .IsOrganizationMember}}
|
|
<a class="{{if $.PageIsOrgMembers}}active {{end}}item" href="{{$.OrgLink}}/members">
|
|
{{svg "octicon-person"}} {{$.locale.Tr "org.members"}}
|
|
{{if .NumMembers}}
|
|
<div class="ui small label">{{.NumMembers}}</div>
|
|
{{end}}
|
|
</a>
|
|
<a class="{{if $.PageIsOrgTeams}}active {{end}}item" href="{{$.OrgLink}}/teams">
|
|
{{svg "octicon-people"}} {{$.locale.Tr "org.teams"}}
|
|
{{if .NumTeams}}
|
|
<div class="ui small label">{{.NumTeams}}</div>
|
|
{{end}}
|
|
</a>
|
|
{{end}}
|
|
|
|
{{if .IsOrganizationOwner}}
|
|
<div class="right menu">
|
|
<a class="{{if .PageIsOrgSettings}}active {{end}}item" href="{{.OrgLink}}/settings">
|
|
{{svg "octicon-tools"}} {{.locale.Tr "repo.settings"}}
|
|
</a>
|
|
</div>
|
|
{{end}}
|
|
</div>
|
|
</div>
|