]> source.dussan.org Git - gitea.git/commitdiff
highlight user details link (#26998) (#27376)
authorGiteabot <teabot@gitea.io>
Sun, 1 Oct 2023 10:23:42 +0000 (18:23 +0800)
committerGitHub <noreply@github.com>
Sun, 1 Oct 2023 10:23:42 +0000 (10:23 +0000)
Backport #26998 by @denyskon

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
https://github.com/go-gitea/gitea/pull/26713#pullrequestreview-1603001285

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: Denys Konovalov <kontakt@denyskon.de>
Co-authored-by: silverwind <me@silverwind.io>
templates/admin/org/list.tmpl
templates/admin/user/list.tmpl

index 1c041ca347340dc68e8abd22e238e709f2af8749..0d79456b47c7f59373de14dfdc2dc9680f3cf412 100644 (file)
@@ -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>
@@ -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>
index fba67fac156cfa93f838b21e64d28327b0e9e49a..46fd376dae9da781be887980df9220246ddd388d 100644 (file)
@@ -77,6 +77,7 @@
                                                        {{ctx.Locale.Tr "admin.users.last_login"}}
                                                        {{SortArrow "lastlogin" "reverselastlogin" $.SortType false}}
                                                </th>
+                                               <th></th>
                                        </tr>
                                </thead>
                                <tbody>
@@ -84,7 +85,7 @@
                                                <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 */}}
                                                        {{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>