]> source.dussan.org Git - gitea.git/commitdiff
add a shortcut to user's profile page to admin user details (#27299)
authortechknowlogick <techknowlogick@gitea.com>
Sun, 8 Oct 2023 02:48:32 +0000 (22:48 -0400)
committerGitHub <noreply@github.com>
Sun, 8 Oct 2023 02:48:32 +0000 (02:48 +0000)
templates/shared/user/profile_big_avatar.tmpl

index 47db7e23a6e81d2949362f18e053058e5cce21e0..a637a9a5f91515742bdf42e67039dacbf7161c6a 100644 (file)
        </div>
        <div class="content gt-word-break profile-avatar-name">
                {{if .ContextUser.FullName}}<span class="header text center">{{.ContextUser.FullName}}</span>{{end}}
-               <span class="username text center">{{.ContextUser.Name}}</span>
+               <span class="username text center">{{.ContextUser.Name}} {{if .IsAdmin}}
+                                       <a class="muted" href="{{AppSubUrl}}/admin/users/{{.ContextUser.ID}}" data-tooltip-content="{{ctx.Locale.Tr "admin.users.details"}}">
+                                               {{svg "octicon-gear" 18}}
+                                       </a>
+                               {{end}}</span>
                <div class="gt-mt-3">
                        <a class="muted" href="{{.ContextUser.HomeLink}}?tab=followers">{{svg "octicon-person" 18 "gt-mr-2"}}{{.NumFollowers}} {{ctx.Locale.Tr "user.followers"}}</a> ยท <a class="muted" href="{{.ContextUser.HomeLink}}?tab=following">{{.NumFollowing}} {{ctx.Locale.Tr "user.following"}}</a>
                        {{if .EnableFeed}}