Skip to content

Commit 17f9ab4

Browse files
thibaultmeyerstrk
authored andcommitted
Use user fullname if resolved
1 parent 5a8cb2d commit 17f9ab4

File tree

3 files changed

+15
-3
lines changed

3 files changed

+15
-3
lines changed

templates/repo/commits_table.tmpl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,11 @@
3030
<tr>
3131
<td class="author">
3232
{{if .User}}
33-
<img class="ui avatar image" src="{{.User.RelAvatarLink}}" alt=""/>&nbsp;&nbsp;<a href="{{AppSubUrl}}/{{.User.Name}}">{{.Author.Name}}</a>
33+
{{if .User.FullName}}
34+
<img class="ui avatar image" src="{{.User.RelAvatarLink}}" alt=""/>&nbsp;&nbsp;<a href="{{AppSubUrl}}/{{.User.Name}}">{{.User.FullName}}</a>
35+
{{else}}
36+
<img class="ui avatar image" src="{{.User.RelAvatarLink}}" alt=""/>&nbsp;&nbsp;<a href="{{AppSubUrl}}/{{.User.Name}}">{{.Author.Name}}</a>
37+
{{end}}
3438
{{else}}
3539
<img class="ui avatar image" src="{{AvatarLink .Author.Email}}" alt=""/>&nbsp;&nbsp;{{.Author.Name}}
3640
{{end}}

templates/repo/diff/page.tmpl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,11 @@
1414
<div class="ui attached info segment">
1515
{{if .Author}}
1616
<img class="ui avatar image" src="{{.Author.RelAvatarLink}}" />
17-
<a href="{{.Author.HomeLink}}"><strong>{{.Commit.Author.Name}}</strong></a> {{if .IsSigned}}<{{.Commit.Author.Email}}>{{end}}
17+
{{if .Author.FullName}}
18+
<a href="{{.Author.HomeLink}}"><strong>{{.Author.FullName}}</strong></a> {{if .IsSigned}}<{{.Commit.Author.Email}}>{{end}}
19+
{{else}}
20+
<a href="{{.Author.HomeLink}}"><strong>{{.Commit.Author.Name}}</strong></a> {{if .IsSigned}}<{{.Commit.Author.Email}}>{{end}}
21+
{{end}}
1822
{{else}}
1923
<img class="ui avatar image" src="{{AvatarLink .Commit.Author.Email}}" />
2024
<strong>{{.Commit.Author.Name}}</strong>

templates/repo/view_list.tmpl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@
44
<th class="four wide">
55
{{if .LatestCommitUser}}
66
<img class="ui avatar image img-12" src="{{.LatestCommitUser.RelAvatarLink}}" />
7-
<a href="{{AppSubUrl}}/{{.LatestCommitUser.Name}}"><strong>{{.LatestCommit.Author.Name}}</strong></a>
7+
{{if .LatestCommitUser.FullName}}
8+
<a href="{{AppSubUrl}}/{{.LatestCommitUser.Name}}"><strong>{{.LatestCommitUser.FullName}}</strong></a>
9+
{{else}}
10+
<a href="{{AppSubUrl}}/{{.LatestCommitUser.Name}}"><strong>{{.LatestCommit.Author.Name}}</strong></a>
11+
{{end}}
812
{{else}}
913
<img class="ui avatar image img-12" src="{{AvatarLink .LatestCommit.Author.Email}}" />
1014
<strong>{{.LatestCommit.Author.Name}}</strong>

0 commit comments

Comments
 (0)