aboutsummaryrefslogtreecommitdiffstats
path: root/templates/org/team/teams.tmpl
blob: 9a7dae8f328df3a749051e3235049e5b20aebf80 (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
{{template "base/head" .}}
<div role="main" aria-label="{{.Title}}" class="page-content organization teams">
	{{template "org/header" .}}
	<div class="ui container">
		{{template "base/alert" .}}
		{{if .IsOrganizationOwner}}
			<div class="text right">
				<a class="ui green button" href="{{.OrgLink}}/teams/new">{{svg "octicon-plus"}} {{.locale.Tr "org.create_new_team"}}</a>
			</div>
			<div class="divider"></div>
		{{end}}

		<div class="ui two column stackable grid">
			{{range .Teams}}
				<div class="column">
					<div class="ui top attached header">
						<a class="text black" href="{{$.OrgLink}}/teams/{{.LowerName | PathEscape}}"><strong>{{.Name}}</strong></a>
						<div class="ui right">
							{{if .IsMember $.SignedUser.ID}}
								<form>
									<button class="ui red tiny button delete-button" data-modal-id="leave-team"
										data-url="{{$.OrgLink}}/teams/{{.LowerName | PathEscape}}/action/leave" data-datauid="{{$.SignedUser.ID}}"
										data-name="{{.Name}}">{{$.locale.Tr "org.teams.leave"}}</button>
								</form>
							{{else if $.IsOrganizationOwner}}
								<form method="post" action="{{$.OrgLink}}/teams/{{.LowerName | PathEscape}}/action/join">
									{{$.CsrfTokenHtml}}
									<button type="submit" class="ui primary small button" name="uid" value="{{$.SignedUser.ID}}">{{$.locale.Tr "org.teams.join"}}</button>
								</form>
							{{end}}
						</div>
					</div>
					<div class="ui attached segment members">
						{{range .Members}}
							{{template "shared/user/avatarlink" dict "Context" $.Context "user" .}}
						{{end}}
					</div>
					<div class="ui bottom attached header">
						<p class="team-meta">{{.NumMembers}} {{$.locale.Tr "org.lower_members"}} · {{.NumRepos}} {{$.locale.Tr "org.lower_repositories"}}</p>
					</div>
				</div>
			{{end}}
		</div>
	</div>
</div>
<div class="ui g-modal-confirm delete modal" id="leave-team">
	<div class="header">
		{{$.locale.Tr "org.teams.leave"}}
	</div>
	<div class="content">
		<p>{{$.locale.Tr "org.teams.leave.detail" `<span class="name"></span>` | Safe}}</p>
	</div>
	{{template "base/modal_actions_confirm" .}}
</div>
{{template "base/footer" .}}