Skip to content

Commit

Permalink
highlight user details link (#26998)
Browse files Browse the repository at this point in the history
This PR adds a separated column in the users table for operations. The
username link now redirects back to user page.


![grafik](https://github.com/go-gitea/gitea/assets/47871822/df8c8b30-3da6-443c-ae0f-6e3cac7dd9bb)

Resolves
#26713 (review)

Co-authored-by: silverwind <me@silverwind.io>
  • Loading branch information
denyskon and silverwind committed Oct 1, 2023
1 parent 83f5716 commit 4ab597f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
4 changes: 2 additions & 2 deletions templates/admin/org/list.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
{{ctx.Locale.Tr "admin.users.created"}}
{{SortArrow "recentupdate" "leastupdate" $.SortType false}}
</th>
<th>{{ctx.Locale.Tr "admin.users.edit"}}</th>
<th></th>
</tr>
</thead>
<tbody>
Expand All @@ -45,7 +45,7 @@
<td>{{.NumMembers}}</td>
<td>{{.NumRepos}}</td>
<td>{{DateTime "short" .CreatedUnix}}</td>
<td><a href="{{.OrganisationLink}}/settings">{{svg "octicon-pencil"}}</a></td>
<td><a href="{{.OrganisationLink}}/settings" data-tooltip-content="{{ctx.Locale.Tr "edit"}}">{{svg "octicon-pencil"}}</a></td>
</tr>
{{end}}
</tbody>
Expand Down
9 changes: 8 additions & 1 deletion templates/admin/user/list.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,15 @@
{{ctx.Locale.Tr "admin.users.last_login"}}
{{SortArrow "lastlogin" "reverselastlogin" $.SortType false}}
</th>
<th></th>
</tr>
</thead>
<tbody>
{{range .Users}}
<tr>
<td>{{.ID}}</td>
<td>
<a href="{{$.Link}}/{{.ID}}">{{.Name}}</a>
<a href="{{.HomeLink}}">{{.Name}}</a>
{{if .IsAdmin}}
<span class="ui mini label">{{ctx.Locale.Tr "admin.users.admin"}}</span>
{{else if eq 2 .Type}}{{/* Reserved user */}}
Expand All @@ -105,6 +106,12 @@
{{else}}
<td><span>{{ctx.Locale.Tr "admin.users.never_login"}}</span></td>
{{end}}
<td>
<div class="gt-df gt-gap-3">
<a href="{{$.Link}}/{{.ID}}" data-tooltip-content="{{ctx.Locale.Tr "admin.users.details"}}">{{svg "octicon-person"}}</a>
<a href="{{$.Link}}/{{.ID}}/edit" data-tooltip-content="{{ctx.Locale.Tr "edit"}}">{{svg "octicon-pencil"}}</a>
</div>
</td>
</tr>
{{end}}
</tbody>
Expand Down

0 comments on commit 4ab597f

Please sign in to comment.