aboutsummaryrefslogtreecommitdiffstats
path: root/templates/org/team/members.tmpl
blob: a064ee9b4f7be499dd24280143407e0d43f29261 (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
{{template "base/head" .}}
<div class="page-content organization teams">
	{{template "org/header" .}}
	<div class="ui container">
		{{template "base/alert" .}}
		<div class="ui grid">
			{{template "org/team/sidebar" .}}
			<div class="ui ten wide column">
				{{template "org/team/navbar" .}}
				{{if .IsOrganizationOwner}}
					<div class="ui attached segment">
						<form class="ui form" id="add-member-form" action="{{$.OrgLink}}/teams/{{$.Team.LowerName | PathEscape}}/action/add" method="post">
							{{.CsrfTokenHtml}}
							<input type="hidden" name="uid" value="{{.SignedUser.ID}}">
							<div class="inline field ui left">
								<div id="search-user-box" class="ui search">
									<div class="ui input">
										<input class="prompt" name="uname" placeholder="{{.i18n.Tr "repo.settings.search_user_placeholder"}}" autocomplete="off" required>
									</div>
								</div>
							</div>
							<button class="ui green button">{{.i18n.Tr "org.teams.add_team_member"}}</button>
						</form>
					</div>
				{{end}}
				<div class="ui bottom attached table segment members">
					{{range .Team.Members}}
						<div class="item">
							{{if and $.IsOrganizationOwner (not (eq $.SignedUser.ID .ID))}}
								<form>
									<button class="ui red button delete-button right" data-modal-id="remove-team-member"
										data-url="{{$.OrgLink}}/teams/{{$.Team.LowerName | PathEscape}}/action/remove" data-datauid="{{.ID}}"
										data-name="{{.DisplayName}}"
										data-data-team-name="{{$.Team.Name}}">{{$.i18n.Tr "org.members.remove"}}</button>
								</form>
							{{end}}
							<a href="{{.HomeLink}}">
								{{avatar .}}
								{{.DisplayName}}
							</a>
						</div>
					{{else}}
						<div class="item">
							<span class="text grey italic">{{$.i18n.Tr "org.teams.members.none"}}</span>
						</div>
					{{end}}
				</div>
			</div>
		</div>
	</div>
</div>
<div class="ui small basic delete modal" id="remove-team-member">
	<div class="ui icon header">
		{{svg "octicon-x" 16 "close inside"}}
		{{$.i18n.Tr "org.members.remove"}}
	</div>
	<div class="content">
		<p>{{$.i18n.Tr "org.members.remove.detail" `<span class="name"></span>` `<span class="dataTeamName"></span>` | Safe}}</p>
	</div>
	{{template "base/delete_modal_actions" .}}
</div>
{{template "base/footer" .}}