|
1 | 1 | {{template "base/head" .}} |
2 | | -<div role="main" aria-label="{{.Title}}" class="page-content organization members"> |
| 2 | +<div role="main" aria-label="{{.Title}}" class="page-content organization"> |
3 | 3 | {{template "org/header" .}} |
4 | 4 | <div class="ui container"> |
5 | 5 | {{template "base/alert" .}} |
6 | 6 |
|
7 | | - <div class="list"> |
| 7 | + <div class="flex-list"> |
8 | 8 | {{range .Members}} |
9 | | - <div class="item ui grid"> |
10 | | - <div class="ui four wide column gt-df"> |
| 9 | + {{$isPublic := index $.MembersIsPublicMember .ID}} |
| 10 | + <div class="flex-item {{if $.PublicOnly}}flex-item-center{{end}}"> |
| 11 | + <div class="flex-item-leading"> |
11 | 12 | <a href="{{.HomeLink}}">{{avatar $.Context . 48}}</a> |
12 | | - <div> |
13 | | - <div class="meta"><a href="{{.HomeLink}}">{{.Name}}</a></div> |
14 | | - <div class="meta">{{.FullName}}</div> |
15 | | - </div> |
16 | 13 | </div> |
17 | | - <div class="ui four wide column center"> |
18 | | - <div class="meta"> |
19 | | - {{$.locale.Tr "org.members.membership_visibility"}} |
20 | | - </div> |
21 | | - <div class="meta"> |
22 | | - {{$isPublic := index $.MembersIsPublicMember .ID}} |
23 | | - {{if $isPublic}} |
24 | | - <strong>{{$.locale.Tr "org.members.public"}}</strong> |
25 | | - {{if or (eq $.SignedUser.ID .ID) $.IsOrganizationOwner}}(<a class="link-action" href data-url="{{$.OrgLink}}/members/action/private?uid={{.ID}}">{{$.locale.Tr "org.members.public_helper"}}</a>){{end}} |
26 | | - {{else}} |
27 | | - <strong>{{$.locale.Tr "org.members.private"}}</strong> |
28 | | - {{if or (eq $.SignedUser.ID .ID) $.IsOrganizationOwner}}(<a class="link-action" href data-url="{{$.OrgLink}}/members/action/public?uid={{.ID}}">{{$.locale.Tr "org.members.private_helper"}}</a>){{end}} |
| 14 | + <div class="flex-item-main"> |
| 15 | + <div class="flex-item-title"> |
| 16 | + {{template "shared/user/name" .}} |
| 17 | + {{if not $isPublic}} |
| 18 | + <span class="ui basic tiny label">{{$.locale.Tr "org.members.private"}}</span> |
29 | 19 | {{end}} |
30 | 20 | </div> |
31 | | - </div> |
32 | | - {{if not $.PublicOnly}} |
33 | | - <div class="ui three wide column center"> |
34 | | - <div class="meta"> |
| 21 | + {{if not $.PublicOnly}} |
| 22 | + <div class="flex-item-body"> |
35 | 23 | {{$.locale.Tr "org.members.member_role"}} |
| 24 | + <strong class="flex-text-inline">{{if index $.MembersIsUserOrgOwner .ID}}{{svg "octicon-shield-lock"}} {{$.locale.Tr "org.members.owner"}}{{else}}{{$.locale.Tr "org.members.member"}}{{end}}</strong> |
36 | 25 | </div> |
37 | | - <div class="meta"> |
38 | | - <strong>{{if index $.MembersIsUserOrgOwner .ID}}{{svg "octicon-shield-lock"}} {{$.locale.Tr "org.members.owner"}}{{else}}{{$.locale.Tr "org.members.member"}}{{end}}</strong> |
39 | | - </div> |
40 | | - </div> |
41 | | - <div class="ui two wide column center"> |
42 | 26 | {{if $.IsOrganizationOwner}} |
43 | | - <div class="meta"> |
| 27 | + <div class="flex-item-body"> |
44 | 28 | {{$.locale.Tr "admin.users.2fa"}} |
45 | | - </div> |
46 | | - <div class="meta"> |
47 | 29 | <strong> |
48 | 30 | {{if index $.MembersTwoFaStatus .ID}} |
49 | 31 | <span class="text green">{{svg "octicon-check"}}</span> |
|
53 | 35 | </strong> |
54 | 36 | </div> |
55 | 37 | {{end}} |
56 | | - </div> |
57 | | - {{end}} |
58 | | - <div class="ui three wide column gt-df gt-ac gt-je"> |
59 | | - <div class="text right"> |
60 | | - {{if eq $.SignedUser.ID .ID}} |
61 | | - <form> |
62 | | - <button class="ui red small button delete-button" data-modal-id="leave-organization" |
63 | | - data-url="{{$.OrgLink}}/members/action/leave" data-datauid="{{.ID}}" |
64 | | - data-name="{{.DisplayName}}" |
65 | | - data-data-organization-name="{{$.Org.DisplayName}}">{{$.locale.Tr "org.members.leave"}}</button> |
66 | | - </form> |
67 | | - {{else if $.IsOrganizationOwner}} |
68 | | - <form> |
69 | | - <button class="ui red small button delete-button" data-modal-id="remove-organization-member" |
70 | | - data-url="{{$.OrgLink}}/members/action/remove" data-datauid="{{.ID}}" |
71 | | - data-name="{{.DisplayName}}" |
72 | | - data-data-organization-name="{{$.Org.DisplayName}}">{{$.locale.Tr "org.members.remove"}}</button> |
73 | | - </form> |
| 38 | + {{end}} |
| 39 | + </div> |
| 40 | + <div class="flex-item-trailing"> |
| 41 | + {{if or (eq $.SignedUser.ID .ID) $.IsOrganizationOwner}} |
| 42 | + {{if $isPublic}} |
| 43 | + <a class="ui tiny button link-action" href data-url="{{$.OrgLink}}/members/action/private?uid={{.ID}}">{{svg "octicon-eye-closed" 12 "icon"}}{{$.locale.Tr "org.members.public_helper"}}</a> |
| 44 | + {{else}} |
| 45 | + <a class="ui tiny button link-action" href data-url="{{$.OrgLink}}/members/action/public?uid={{.ID}}">{{svg "octicon-eye" 12 "icon"}}{{$.locale.Tr "org.members.private_helper"}}</a> |
74 | 46 | {{end}} |
75 | | - </div> |
| 47 | + {{end}} |
| 48 | + {{if eq $.SignedUser.ID .ID}} |
| 49 | + <form> |
| 50 | + <button class="ui red tiny button delete-button" data-modal-id="leave-organization" |
| 51 | + data-url="{{$.OrgLink}}/members/action/leave" data-datauid="{{.ID}}" |
| 52 | + data-name="{{.DisplayName}}" |
| 53 | + data-data-organization-name="{{$.Org.DisplayName}}">{{$.locale.Tr "org.members.leave"}}</button> |
| 54 | + </form> |
| 55 | + {{else if $.IsOrganizationOwner}} |
| 56 | + <form> |
| 57 | + <button class="ui red tiny button delete-button" data-modal-id="remove-organization-member" |
| 58 | + data-url="{{$.OrgLink}}/members/action/remove" data-datauid="{{.ID}}" |
| 59 | + data-name="{{.DisplayName}}" |
| 60 | + data-data-organization-name="{{$.Org.DisplayName}}">{{$.locale.Tr "org.members.remove"}}</button> |
| 61 | + </form> |
| 62 | + {{end}} |
76 | 63 | </div> |
77 | 64 | </div> |
78 | 65 | {{end}} |
|
0 commit comments