enh: admin user view (#7062)

- directly click email address
- show prohibited login state

## Testing

- visit admin panel
- visit a user
- click on "view details"
- check that email address is clickable and opens local email editor
- check that "suspended account" status is visible

![](/attachments/251789ec-0cf1-41f9-bffe-48693917c467)

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7062
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: Otto Richter <git@otto.splvs.net>
Co-committed-by: Otto Richter <git@otto.splvs.net>
This commit is contained in:
Otto Richter 2025-02-25 20:37:28 +00:00 committed by Otto
parent 6fb069cc50
commit 3372db660c
2 changed files with 9 additions and 1 deletions

View file

@ -26,6 +26,14 @@
{{svg "octicon-x"}}
{{end}}
</div>
<div class="flex-item-body">
<b>{{ctx.Locale.Tr "admin.users.prohibit_login"}}:</b>
{{if .User.ProhibitLogin}}
{{svg "octicon-check"}}
{{else}}
{{svg "octicon-x"}}
{{end}}
</div>
<div class="flex-item-body">
<b>{{ctx.Locale.Tr "admin.users.restricted"}}:</b>
{{if .User.IsRestricted}}

View file

@ -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}}