summaryrefslogtreecommitdiffstats
path: root/templates/admin/org/list.tmpl
blob: 987ceab1e0f99044f156475a46a6e1463b63161a (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
{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin user")}}
	<div class="admin-setting-content">
		<h4 class="ui top attached header">
			{{ctx.Locale.Tr "admin.orgs.org_manage_panel"}} ({{ctx.Locale.Tr "admin.total" .Total}})
			<div class="ui right">
				<a class="ui primary tiny button" href="{{AppSubUrl}}/org/create">{{ctx.Locale.Tr "admin.orgs.new_orga"}}</a>
			</div>
		</h4>
		<div class="ui attached segment">
			<div class="ui secondary filter menu tw-items-center tw-mx-0">
				<form class="ui form ignore-dirty tw-flex-1">
					{{template "shared/search/combo" dict "Value" .Keyword "Placeholder" (ctx.Locale.Tr "search.org_kind")}}
				</form>
				<!-- Sort -->
				<div class="ui dropdown type jump item tw-mr-0">
					<span class="text">
						{{ctx.Locale.Tr "repo.issues.filter_sort"}}
					</span>
					{{svg "octicon-triangle-down" 14 "dropdown icon"}}
					<div class="menu">
						<a class="{{if or (eq .SortType "oldest") (not .SortType)}}active {{end}}item" href="?sort=oldest&q={{$.Keyword}}">{{ctx.Locale.Tr "repo.issues.filter_sort.oldest"}}</a>
						<a class="{{if eq .SortType "newest"}}active {{end}}item" href="?sort=newest&q={{$.Keyword}}">{{ctx.Locale.Tr "repo.issues.filter_sort.latest"}}</a>
						<a class="{{if eq .SortType "alphabetically"}}active {{end}}item" href="?sort=alphabetically&q={{$.Keyword}}">{{ctx.Locale.Tr "repo.issues.label.filter_sort.alphabetically"}}</a>
						<a class="{{if eq .SortType "reversealphabetically"}}active {{end}}item" href="?sort=reversealphabetically&q={{$.Keyword}}">{{ctx.Locale.Tr "repo.issues.label.filter_sort.reverse_alphabetically"}}</a>
						<a class="{{if eq .SortType "recentupdate"}}active {{end}}item" href="?sort=recentupdate&q={{$.Keyword}}">{{ctx.Locale.Tr "repo.issues.filter_sort.recentupdate"}}</a>
						<a class="{{if eq .SortType "leastupdate"}}active {{end}}item" href="?sort=leastupdate&q={{$.Keyword}}">{{ctx.Locale.Tr "repo.issues.filter_sort.leastupdate"}}</a>
					</div>
				</div>
			</div>
		</div>
		<div class="ui attached table segment">
			<table class="ui very basic striped table unstackable">
				<thead>
					<tr>
						<th data-sortt-asc="oldest" data-sortt-desc="newest">ID{{SortArrow "oldest" "newest" $.SortType false}}</th>
						<th data-sortt-asc="alphabetically" data-sortt-desc="reversealphabetically" data-sortt-default="true">
							{{ctx.Locale.Tr "admin.orgs.name"}}
							{{SortArrow "alphabetically" "reversealphabetically" $.SortType true}}
						</th>
						<th>{{ctx.Locale.Tr "admin.orgs.teams"}}</th>
						<th>{{ctx.Locale.Tr "admin.orgs.members"}}</th>
						<th>{{ctx.Locale.Tr "admin.users.repos"}}</th>
						<th data-sortt-asc="recentupdate" data-sortt-desc="leastupdate">
							{{ctx.Locale.Tr "admin.users.created"}}
							{{SortArrow "recentupdate" "leastupdate" $.SortType false}}
						</th>
						<th></th>
					</tr>
				</thead>
				<tbody>
					{{range .Users}}
						<tr>
							<td>{{.ID}}</td>
							<td>
								<a href="{{.HomeLink}}">{{.Name}}</a>
								{{if .Visibility.IsPrivate}}
									<span class="text gold">{{svg "octicon-lock"}}</span>
								{{end}}
								{{if eq .Type 3}}{{/* Reserved organization */}}
									<span class="ui mini label">{{ctx.Locale.Tr "admin.users.reserved"}}</span>
								{{end}}
							</td>
							<td>{{.NumTeams}}</td>
							<td>{{.NumMembers}}</td>
							<td>{{.NumRepos}}</td>
							<td>{{DateTime "short" .CreatedUnix}}</td>
							<td><a href="{{.OrganisationLink}}/settings" data-tooltip-content="{{ctx.Locale.Tr "edit"}}">{{svg "octicon-pencil"}}</a></td>
						</tr>
					{{end}}
				</tbody>
			</table>
		</div>

		{{template "base/paginate" .}}
	</div>
{{template "admin/layout_footer" .}}