From 6c52fcceb73690da8904d585fd103a7fa315415c Mon Sep 17 00:00:00 2001 From: Flare Date: Tue, 25 Oct 2016 20:23:29 +0800 Subject: [PATCH 1/3] Modified template to use Gogs supplied name if registered user --- templates/repo/commits_table.tmpl | 2 +- templates/repo/view_list.tmpl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/repo/commits_table.tmpl b/templates/repo/commits_table.tmpl index 03e8591f682be..f1ce05c2bc8a0 100644 --- a/templates/repo/commits_table.tmpl +++ b/templates/repo/commits_table.tmpl @@ -30,7 +30,7 @@ {{if .User}} -   {{.Author.Name}} +   {{.User.Name}} {{else}}   {{.Author.Name}} {{end}} diff --git a/templates/repo/view_list.tmpl b/templates/repo/view_list.tmpl index 0881ce99387c6..6d837d500ef21 100644 --- a/templates/repo/view_list.tmpl +++ b/templates/repo/view_list.tmpl @@ -4,7 +4,7 @@ {{if .LatestCommitUser}} - {{.LatestCommit.Author.Name}} + {{.LatestCommitUser.Name}} {{else}} {{.LatestCommit.Author.Name}} From 1b965d111c7e65557682d985442fe2289e096745 Mon Sep 17 00:00:00 2001 From: Flare Date: Tue, 25 Oct 2016 20:45:43 +0800 Subject: [PATCH 2/3] Fix usage of full names --- templates/repo/commits_table.tmpl | 2 +- templates/repo/view_list.tmpl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/repo/commits_table.tmpl b/templates/repo/commits_table.tmpl index f1ce05c2bc8a0..2571984016e9c 100644 --- a/templates/repo/commits_table.tmpl +++ b/templates/repo/commits_table.tmpl @@ -30,7 +30,7 @@ {{if .User}} -   {{.User.Name}} +   {{.User.FullName}} {{else}}   {{.Author.Name}} {{end}} diff --git a/templates/repo/view_list.tmpl b/templates/repo/view_list.tmpl index 6d837d500ef21..c64c1d137848e 100644 --- a/templates/repo/view_list.tmpl +++ b/templates/repo/view_list.tmpl @@ -4,7 +4,7 @@ {{if .LatestCommitUser}} - {{.LatestCommitUser.Name}} + {{.LatestCommitUser.FullName}} {{else}} {{.LatestCommit.Author.Name}} From 05e5d797bd79d63b921408a23d0ae893455d2cb4 Mon Sep 17 00:00:00 2001 From: Flare Date: Wed, 26 Oct 2016 18:05:23 +0800 Subject: [PATCH 3/3] Added tweak to diff page too. --- templates/repo/diff/page.tmpl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/templates/repo/diff/page.tmpl b/templates/repo/diff/page.tmpl index 0a35a80427b33..f22115d2c48cd 100644 --- a/templates/repo/diff/page.tmpl +++ b/templates/repo/diff/page.tmpl @@ -14,7 +14,11 @@
{{if .Author}} - {{.Commit.Author.Name}} {{if .IsSigned}}<{{.Commit.Author.Email}}>{{end}} + {{if .Author.FullName}} + {{.Author.FullName}} {{if .IsSigned}}<{{.Commit.Author.Email}}>{{end}} + {{else}} + {{.Commit.Author.Name}} {{if .IsSigned}}<{{.Commit.Author.Email}}>{{end}} + {{end}} {{else}} {{.Commit.Author.Name}}