summaryrefslogtreecommitdiffstats
path: root/templates/org/home.tmpl
blob: 1b3cabbde721c2d1689b1accc779d3b07c8db31c (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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
{{template "base/head" .}}
<div role="main" aria-label="{{.Title}}" class="page-content organization profile">
	<div class="ui container gt-df">
		{{avatar $.Context .Org 140 "org-avatar"}}
		<div id="org-info">
			<div class="ui header">
				{{.Org.DisplayName}}
				{{if .EnableFeed}}
					<a href="{{.Org.HomeLink}}.rss"><i class="ui grey icon tooltip gt-ml-3" data-content="{{.locale.Tr "rss_feed"}}" data-position="top center">{{svg "octicon-rss" 36}}</i></a>
				{{end}}
				<span class="org-visibility">
					{{if .Org.Visibility.IsLimited}}<div class="ui large basic horizontal label">{{.locale.Tr "org.settings.visibility.limited_shortname"}}</div>{{end}}
					{{if .Org.Visibility.IsPrivate}}<div class="ui large basic horizontal label">{{.locale.Tr "org.settings.visibility.private_shortname"}}</div>{{end}}
				</span>
			</div>
			{{if $.RenderedDescription}}<div class="render-content markup">{{$.RenderedDescription|Str2html}}</div>{{end}}
			<div class="text grey meta">
				{{if .Org.Location}}<div class="item">{{svg "octicon-location"}} <span>{{.Org.Location}}</span></div>{{end}}
				{{if .Org.Website}}<div class="item">{{svg "octicon-link"}} <a target="_blank" rel="noopener noreferrer me" href="{{.Org.Website}}">{{.Org.Website}}</a></div>{{end}}
			</div>
		</div>
	</div>

	{{template "org/menu" .}}

	<div class="ui container">
		<div class="ui mobile reversed stackable grid">
			<div class="ui eleven wide column">
				{{template "explore/repo_search" .}}
				{{template "explore/repo_list" .}}
				{{template "base/paginate" .}}
			</div>

			<div class="ui five wide column">
				{{if .CanCreateOrgRepo}}
					<div class="center aligned">
						<a class="ui green button" href="{{AppSubUrl}}/repo/create?org={{.Org.ID}}">{{.locale.Tr "new_repo"}}</a>
						{{if not .DisableNewPullMirrors}}
							<a class="ui green button" href="{{AppSubUrl}}/repo/migrate?org={{.Org.ID}}&mirror=1">{{.locale.Tr "new_migrate"}}</a>
						{{end}}
					</div>
					<div class="ui divider"></div>
				{{end}}
				<h4 class="ui top attached header gt-df">
					<strong class="gt-f1">{{.locale.Tr "org.people"}}</strong>
					<div class="ui">
						<a class="text grey gt-dif gt-ac" href="{{.OrgLink}}/members"><span>{{.MembersTotal}}</span> {{svg "octicon-chevron-right"}}</a>
					</div>
				</h4>
				<div class="ui attached segment members">
					{{$isMember := .IsOrganizationMember}}
					{{range .Members}}
						{{if or $isMember (call $.IsPublicMember .ID)}}
							<a href="{{.HomeLink}}" title="{{.Name}}{{if .FullName}} ({{.FullName}}){{end}}">
								{{avatar $.Context .}}
							</a>
						{{end}}
					{{end}}
				</div>

				{{if .IsOrganizationMember}}
					<div class="ui top attached header gt-df">
						<strong class="gt-f1">{{.locale.Tr "org.teams"}}</strong>
						<div class="ui">
							<a class="text grey gt-dif gt-ac" href="{{.OrgLink}}/teams"><span>{{.Org.NumTeams}}</span> {{svg "octicon-chevron-right"}}</a>
						</div>
					</div>
					<div class="ui attached table segment teams">
						{{range .Teams}}
							<div class="item">
								<a href="{{$.OrgLink}}/teams/{{.LowerName | PathEscape}}"><strong class="team-name">{{.Name}}</strong></a>
								<p class="text grey">
									<a class="muted" href="{{$.OrgLink}}/teams/{{.LowerName | PathEscape}}"><strong>{{.NumMembers}}</strong> {{$.locale.Tr "org.lower_members"}}</a> ·
									<a class="muted" href="{{$.OrgLink}}/teams/{{.LowerName | PathEscape}}/repositories"><strong>{{.NumRepos}}</strong> {{$.locale.Tr "org.lower_repositories"}}</a>
								</p>
							</div>
						{{end}}
					</div>
					{{if .IsOrganizationOwner}}
						<div class="ui bottom attached segment">
							<a class="ui primary small button" href="{{.OrgLink}}/teams/new">{{.locale.Tr "org.create_new_team"}}</a>
						</div>
					{{end}}
				{{end}}
			</div>
		</div>
	</div>
</div>
{{template "base/footer" .}}