summaryrefslogtreecommitdiffstats
path: root/templates/org
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2022-07-19 18:22:38 +0800
committerGitHub <noreply@github.com>2022-07-19 12:22:38 +0200
commitd6779c7ad3639d6af0c4454a9c22abf21d608922 (patch)
tree99ddb9f813f86ba881948fb3ad29b82ab7888437 /templates/org
parent4c7e51ee3a7f1789e83b7f1aa34cd16f5a2d5648 (diff)
downloadgitea-d6779c7ad3639d6af0c4454a9c22abf21d608922.tar.gz
gitea-d6779c7ad3639d6af0c4454a9c22abf21d608922.zip
Fix public org members displayed too many informations (#20403)
Diffstat (limited to 'templates/org')
-rw-r--r--templates/org/member/members.tmpl42
1 files changed, 22 insertions, 20 deletions
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}}
</div>
</div>
- <div class="ui three wide column center">
- <div class="meta">
- {{$.locale.Tr "org.members.member_role"}}
- </div>
- <div class="meta">
- <strong>{{if index $.MembersIsUserOrgOwner .ID}}{{svg "octicon-shield-lock"}} {{$.locale.Tr "org.members.owner"}}{{else}}{{$.locale.Tr "org.members.member"}}{{end}}</strong>
- </div>
- </div>
- <div class="ui two wide column center">
- <div class="meta">
- {{$.locale.Tr "admin.users.2fa"}}
+ {{if not .PublicOnly}}
+ <div class="ui three wide column center">
+ <div class="meta">
+ {{$.locale.Tr "org.members.member_role"}}
+ </div>
+ <div class="meta">
+ <strong>{{if index $.MembersIsUserOrgOwner .ID}}{{svg "octicon-shield-lock"}} {{$.locale.Tr "org.members.owner"}}{{else}}{{$.locale.Tr "org.members.member"}}{{end}}</strong>
+ </div>
</div>
- <div class="meta">
- <strong>
- {{if index $.MembersTwoFaStatus .ID}}
- <span class="text green">{{svg "octicon-check"}}</span>
- {{else}}
- {{svg "octicon-x"}}
- {{end}}
- </strong>
+ <div class="ui two wide column center">
+ <div class="meta">
+ {{$.locale.Tr "admin.users.2fa"}}
+ </div>
+ <div class="meta">
+ <strong>
+ {{if index $.MembersTwoFaStatus .ID}}
+ <span class="text green">{{svg "octicon-check"}}</span>
+ {{else}}
+ {{svg "octicon-x"}}
+ {{end}}
+ </strong>
+ </div>
</div>
- </div>
+ {{end}}
<div class="ui three wide column">
<div class="text right">
{{if eq $.SignedUser.ID .ID}}