Fix DEFAULT_SHOW_FULL_NAME=false
has no effect in commit list and commit graph page (#30096)
Fix #20446 This PR will fix the username in: repo home page  repo commit list page  repo commit graph page  pr commit page  Will not fix: wiki revisions page:  ps: the author name is `FullName` by default (cherry picked from commit 61036235966773a0af6b690b10b33ff8222df1d7)
This commit is contained in:
parent
60d2d0ff3a
commit
473b90da53
3 changed files with 3 additions and 3 deletions
|
@ -16,7 +16,7 @@
|
|||
<td class="author tw-flex">
|
||||
{{$userName := .Author.Name}}
|
||||
{{if .User}}
|
||||
{{if .User.FullName}}
|
||||
{{if and .User.FullName DefaultShowFullName}}
|
||||
{{$userName = .User.FullName}}
|
||||
{{end}}
|
||||
{{ctx.AvatarUtils.Avatar .User 28 "tw-mr-2"}}<a class="muted author-wrapper" href="{{.User.HomeLink}}">{{$userName}}</a>
|
||||
|
|
|
@ -61,7 +61,7 @@
|
|||
<span class="author tw-flex tw-items-center tw-mr-2">
|
||||
{{$userName := $commit.Commit.Author.Name}}
|
||||
{{if $commit.User}}
|
||||
{{if $commit.User.FullName}}
|
||||
{{if and $commit.User.FullName DefaultShowFullName}}
|
||||
{{$userName = $commit.User.FullName}}
|
||||
{{end}}
|
||||
<span class="tw-mr-1">{{ctx.AvatarUtils.Avatar $commit.User}}</span>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
{{else}}
|
||||
{{if .LatestCommitUser}}
|
||||
{{ctx.AvatarUtils.Avatar .LatestCommitUser 24 "tw-mr-1"}}
|
||||
{{if .LatestCommitUser.FullName}}
|
||||
{{if and .LatestCommitUser.FullName DefaultShowFullName}}
|
||||
<a class="muted author-wrapper" title="{{.LatestCommitUser.FullName}}" href="{{.LatestCommitUser.HomeLink}}"><strong>{{.LatestCommitUser.FullName}}</strong></a>
|
||||
{{else}}
|
||||
<a class="muted author-wrapper" title="{{if .LatestCommit.Author}}{{.LatestCommit.Author.Name}}{{else}}{{.LatestCommitUser.Name}}{{end}}" href="{{.LatestCommitUser.HomeLink}}"><strong>{{if .LatestCommit.Author}}{{.LatestCommit.Author.Name}}{{else}}{{.LatestCommitUser.Name}}{{end}}</strong></a>
|
||||
|
|
Loading…
Reference in a new issue