mirror of
https://github.com/go-gitea/gitea
synced 2025-08-08 10:38:21 +00:00
User details page (#26713)
This PR implements a proposal to clean up the admin users table by moving some information out to a separate user details page (which also displays some additional information). Other changes: - move edit user page from `/admin/users/{id}` to `/admin/users/{id}/edit` -> `/admin/users/{id}` now shows the user details page - show if user is instance administrator as a label instead of a separate column - separate explore users template into a page- and a shared one, to make it possible to use it on the user details page - fix issue where there was no margin between alert message and following content on admin pages <details> <summary>Screenshots</summary>   </details> Partially resolves #25939 --------- Co-authored-by: Giteabot <teabot@gitea.io>
This commit is contained in:
@@ -68,36 +68,35 @@
|
||||
</th>
|
||||
<th>{{.locale.Tr "email"}}</th>
|
||||
<th>{{.locale.Tr "admin.users.activated"}}</th>
|
||||
<th>{{.locale.Tr "admin.users.admin"}}</th>
|
||||
<th>{{.locale.Tr "admin.users.restricted"}}</th>
|
||||
<th>{{.locale.Tr "admin.users.2fa"}}</th>
|
||||
<th>{{.locale.Tr "admin.users.repos"}}</th>
|
||||
<th>{{.locale.Tr "admin.users.created"}}</th>
|
||||
<th data-sortt-asc="lastlogin" data-sortt-desc="reverselastlogin">
|
||||
{{.locale.Tr "admin.users.last_login"}}
|
||||
{{SortArrow "lastlogin" "reverselastlogin" $.SortType false}}
|
||||
</th>
|
||||
<th>{{.locale.Tr "admin.users.edit"}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{range .Users}}
|
||||
<tr>
|
||||
<td>{{.ID}}</td>
|
||||
<td><a href="{{.HomeLink}}">{{.Name}}</a></td>
|
||||
<td>
|
||||
<a href="{{$.Link}}/{{.ID}}">{{.Name}}</a>
|
||||
{{if .IsAdmin}}
|
||||
<span class="ui basic label">{{$.locale.Tr "admin.users.admin"}}</span>
|
||||
{{end}}
|
||||
</td>
|
||||
<td class="gt-ellipsis gt-max-width-12rem">{{.Email}}</td>
|
||||
<td>{{if .IsActive}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</td>
|
||||
<td>{{if .IsAdmin}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</td>
|
||||
<td>{{if .IsRestricted}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</td>
|
||||
<td>{{if index $.UsersTwoFaStatus .ID}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</td>
|
||||
<td>{{.NumRepos}}</td>
|
||||
<td>{{DateTime "short" .CreatedUnix}}</td>
|
||||
{{if .LastLoginUnix}}
|
||||
<td>{{DateTime "short" .LastLoginUnix}}</td>
|
||||
{{else}}
|
||||
<td><span>{{$.locale.Tr "admin.users.never_login"}}</span></td>
|
||||
{{end}}
|
||||
<td><a href="{{$.Link}}/{{.ID}}">{{svg "octicon-pencil"}}</a></td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
|
Reference in New Issue
Block a user