summaryrefslogtreecommitdiffstats
path: root/templates/org/menu.tmpl
blob: 26c9f980a5a11375ef0de34c1811976af67760b7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<div class="ui 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 .RepoCount}}
				<div class="ui small label">{{.RepoCount}}</div>
			{{end}}
		</a>
		{{if .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"}}&nbsp;{{$.locale.Tr "org.code"}}
		</a>
		{{end}}
		{{if .NumMembers}}
			<a class="{{if $.PageIsOrgMembers}}active {{end}}item" href="{{$.OrgLink}}/members">
				{{svg "octicon-person"}}&nbsp;{{$.locale.Tr "org.members"}}
				<div class="ui small label">{{.NumMembers}}</div>
			</a>
		{{end}}
		{{if .IsOrganizationMember}}
			<a class="{{if $.PageIsOrgTeams}}active {{end}}item" href="{{$.OrgLink}}/teams">
				{{svg "octicon-people"}}&nbsp;{{$.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>