aboutsummaryrefslogtreecommitdiffstats
path: root/templates/org/menu.tmpl
blob: 29238f8d6bb9a0c125a8328d0eb46ad9d44ae021 (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
48
49
50
51
52
53
54
55
<div class="ui container">
	<overflow-menu class="ui secondary pointing tabular borderless menu tw-mb-4">
		<div class="overflow-menu-items">
			{{if .HasProfileReadme}}
				<a class="{{if .PageIsViewOverview}}active {{end}}item" href="{{$.Org.HomeLink}}">
					{{svg "octicon-info"}} {{ctx.Locale.Tr "user.overview"}}
				</a>
			{{end}}
			<a class="{{if .PageIsViewRepositories}}active {{end}}item" href="{{$.Org.HomeLink}}{{if .HasProfileReadme}}/-/repositories{{end}}">
				{{svg "octicon-repo"}} {{ctx.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"}} {{ctx.Locale.Tr "user.projects"}}
				{{if .ProjectCount}}
					<div class="ui small label">{{.ProjectCount}}</div>
				{{end}}
			</a>
			{{end}}
			{{if and .IsPackageEnabled .CanReadPackages}}
			<a class="{{if .IsPackagesPage}}active {{end}}item" href="{{$.Org.HomeLink}}/-/packages">
				{{svg "octicon-package"}} {{ctx.Locale.Tr "packages.title"}}
			</a>
			{{end}}
			{{if and .IsRepoIndexerEnabled .CanReadCode}}
			<a class="{{if .IsCodePage}}active {{end}}item" href="{{$.Org.HomeLink}}/-/code">
				{{svg "octicon-code"}} {{ctx.Locale.Tr "org.code"}}
			</a>
			{{end}}
			{{if .NumMembers}}
			<a class="{{if $.PageIsOrgMembers}}active {{end}}item" href="{{$.OrgLink}}/members">
				{{svg "octicon-person"}} {{ctx.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"}} {{ctx.Locale.Tr "org.teams"}}
				{{if .NumTeams}}
					<div class="ui small label">{{.NumTeams}}</div>
				{{end}}
			</a>
			{{end}}
			{{if .IsOrganizationOwner}}
			<span class="item-flex-space"></span>
			<a class="{{if .PageIsOrgSettings}}active {{end}}item" href="{{.OrgLink}}/settings">
				{{svg "octicon-tools"}} {{ctx.Locale.Tr "repo.settings"}}
			</a>
			{{end}}
		</div>
	</overflow-menu>
</div>