Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Improve admin user view page #33735

Merged
merged 1 commit into from
Feb 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 11 additions & 20 deletions templates/admin/user/view_details.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -9,30 +9,25 @@
{{if .User.IsAdmin}}
<span class="ui basic label">{{ctx.Locale.Tr "admin.users.admin"}}</span>
{{end}}
{{if .User.IsTypeBot}}
<span class="ui basic label">{{ctx.Locale.Tr "admin.users.bot"}}</span>
{{end}}
</div>
<div class="flex-item-body">
<b>{{ctx.Locale.Tr "admin.users.auth_source"}}:</b>
{{if eq .LoginSource.ID 0}}
{{ctx.Locale.Tr "admin.users.local"}}
{{else}}
{{.LoginSource.Name}}
{{end}}
{{Iif (eq .LoginSource.ID 0) (ctx.Locale.Tr "admin.users.local") .LoginSource.Name}}
</div>
<div class="flex-item-body">
<b>{{ctx.Locale.Tr "admin.users.activated"}}:</b>
{{if .User.IsActive}}
{{svg "octicon-check"}}
{{else}}
{{svg "octicon-x"}}
{{end}}
{{svg (Iif .User.IsActive "octicon-check" "octicon-x")}}
</div>
<div class="flex-item-body">
<b>{{ctx.Locale.Tr "admin.users.prohibit_login"}}:</b>
{{svg (Iif .User.ProhibitLogin "octicon-check" "octicon-x")}}
</div>
<div class="flex-item-body">
<b>{{ctx.Locale.Tr "admin.users.restricted"}}:</b>
{{if .User.IsRestricted}}
{{svg "octicon-check"}}
{{else}}
{{svg "octicon-x"}}
{{end}}
{{svg (Iif .User.IsRestricted "octicon-check" "octicon-x")}}
</div>
<div class="flex-item-body">
<b>{{ctx.Locale.Tr "settings.visibility"}}:</b>
Expand All @@ -42,11 +37,7 @@
</div>
<div class="flex-item-body">
<b>{{ctx.Locale.Tr "admin.users.2fa"}}:</b>
{{if .TwoFactorEnabled}}
<span class="text green">{{svg "octicon-check"}}</span>
{{else}}
{{svg "octicon-x"}}
{{end}}
{{svg (Iif .TwoFactorEnabled "octicon-check" "octicon-x")}}
</div>
{{if .User.Language}}
<div class="flex-item-body">
Expand Down
2 changes: 1 addition & 1 deletion templates/admin/user/view_emails.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<div class="flex-item">
<div class="flex-item-main">
<div class="flex-text-block">
{{.Email}}
<a href="mailto:{{.Email}}">{{.Email}}</a>
{{if .IsPrimary}}
<div class="ui primary label">{{ctx.Locale.Tr "settings.primary"}}</div>
{{end}}
Expand Down
Loading