diff --git a/routers/web/org/members.go b/routers/web/org/members.go index 374c893575..ec5a98fc6a 100644 --- a/routers/web/org/members.go +++ b/routers/web/org/members.go @@ -45,6 +45,7 @@ func Members(ctx *context.Context) { } opts.PublicOnly = !isMember && !ctx.Doer.IsAdmin } + ctx.Data["PublicOnly"] = opts.PublicOnly total, err := organization.CountOrgMembers(opts) if err != nil { diff --git a/templates/org/member/members.tmpl b/templates/org/member/members.tmpl index 081a7f0a12..9a2c235aa6 100644 --- a/templates/org/member/members.tmpl +++ b/templates/org/member/members.tmpl @@ -29,28 +29,30 @@ {{end}} -
-
- {{$.locale.Tr "org.members.member_role"}} + {{if not .PublicOnly}} +
+
+ {{$.locale.Tr "org.members.member_role"}} +
+
+ {{if index $.MembersIsUserOrgOwner .ID}}{{svg "octicon-shield-lock"}} {{$.locale.Tr "org.members.owner"}}{{else}}{{$.locale.Tr "org.members.member"}}{{end}} +
-
- {{if index $.MembersIsUserOrgOwner .ID}}{{svg "octicon-shield-lock"}} {{$.locale.Tr "org.members.owner"}}{{else}}{{$.locale.Tr "org.members.member"}}{{end}} +
+
+ {{$.locale.Tr "admin.users.2fa"}} +
+
+ + {{if index $.MembersTwoFaStatus .ID}} + {{svg "octicon-check"}} + {{else}} + {{svg "octicon-x"}} + {{end}} + +
-
-
-
- {{$.locale.Tr "admin.users.2fa"}} -
-
- - {{if index $.MembersTwoFaStatus .ID}} - {{svg "octicon-check"}} - {{else}} - {{svg "octicon-x"}} - {{end}} - -
-
+ {{end}}
{{if eq $.SignedUser.ID .ID}}