aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorThibault Meyer <meyer.thibault@gmail.com>2016-10-29 18:04:56 +0200
committerSandro Santilli <strk@kbt.io>2016-11-04 08:13:14 +0100
commit17f9ab4ff8ceb890bc0456672a079698e32785b3 (patch)
tree1eaeca392910d2e33e53943686501c54cbe99546 /templates
parent5a8cb2dac1fb4877ab0a8b52fdf26d98848928da (diff)
downloadgitea-17f9ab4ff8ceb890bc0456672a079698e32785b3.tar.gz
gitea-17f9ab4ff8ceb890bc0456672a079698e32785b3.zip
Use user fullname if resolved
Diffstat (limited to 'templates')
-rw-r--r--templates/repo/commits_table.tmpl6
-rw-r--r--templates/repo/diff/page.tmpl6
-rw-r--r--templates/repo/view_list.tmpl6
3 files changed, 15 insertions, 3 deletions
diff --git a/templates/repo/commits_table.tmpl b/templates/repo/commits_table.tmpl
index 03e8591f68..4956acd07e 100644
--- a/templates/repo/commits_table.tmpl
+++ b/templates/repo/commits_table.tmpl
@@ -30,7 +30,11 @@
<tr>
<td class="author">
{{if .User}}
- <img class="ui avatar image" src="{{.User.RelAvatarLink}}" alt=""/>&nbsp;&nbsp;<a href="{{AppSubUrl}}/{{.User.Name}}">{{.Author.Name}}</a>
+ {{if .User.FullName}}
+ <img class="ui avatar image" src="{{.User.RelAvatarLink}}" alt=""/>&nbsp;&nbsp;<a href="{{AppSubUrl}}/{{.User.Name}}">{{.User.FullName}}</a>
+ {{else}}
+ <img class="ui avatar image" src="{{.User.RelAvatarLink}}" alt=""/>&nbsp;&nbsp;<a href="{{AppSubUrl}}/{{.User.Name}}">{{.Author.Name}}</a>
+ {{end}}
{{else}}
<img class="ui avatar image" src="{{AvatarLink .Author.Email}}" alt=""/>&nbsp;&nbsp;{{.Author.Name}}
{{end}}
diff --git a/templates/repo/diff/page.tmpl b/templates/repo/diff/page.tmpl
index 0a35a80427..90ee680576 100644
--- a/templates/repo/diff/page.tmpl
+++ b/templates/repo/diff/page.tmpl
@@ -14,7 +14,11 @@
<div class="ui attached info segment">
{{if .Author}}
<img class="ui avatar image" src="{{.Author.RelAvatarLink}}" />
- <a href="{{.Author.HomeLink}}"><strong>{{.Commit.Author.Name}}</strong></a> {{if .IsSigned}}<{{.Commit.Author.Email}}>{{end}}
+ {{if .Author.FullName}}
+ <a href="{{.Author.HomeLink}}"><strong>{{.Author.FullName}}</strong></a> {{if .IsSigned}}<{{.Commit.Author.Email}}>{{end}}
+ {{else}}
+ <a href="{{.Author.HomeLink}}"><strong>{{.Commit.Author.Name}}</strong></a> {{if .IsSigned}}<{{.Commit.Author.Email}}>{{end}}
+ {{end}}
{{else}}
<img class="ui avatar image" src="{{AvatarLink .Commit.Author.Email}}" />
<strong>{{.Commit.Author.Name}}</strong>
diff --git a/templates/repo/view_list.tmpl b/templates/repo/view_list.tmpl
index 0881ce9938..f1cbf58a4a 100644
--- a/templates/repo/view_list.tmpl
+++ b/templates/repo/view_list.tmpl
@@ -4,7 +4,11 @@
<th class="four wide">
{{if .LatestCommitUser}}
<img class="ui avatar image img-12" src="{{.LatestCommitUser.RelAvatarLink}}" />
- <a href="{{AppSubUrl}}/{{.LatestCommitUser.Name}}"><strong>{{.LatestCommit.Author.Name}}</strong></a>
+ {{if .LatestCommitUser.FullName}}
+ <a href="{{AppSubUrl}}/{{.LatestCommitUser.Name}}"><strong>{{.LatestCommitUser.FullName}}</strong></a>
+ {{else}}
+ <a href="{{AppSubUrl}}/{{.LatestCommitUser.Name}}"><strong>{{.LatestCommit.Author.Name}}</strong></a>
+ {{end}}
{{else}}
<img class="ui avatar image img-12" src="{{AvatarLink .LatestCommit.Author.Email}}" />
<strong>{{.LatestCommit.Author.Name}}</strong>