summaryrefslogtreecommitdiffstats
path: root/templates/repo
diff options
context:
space:
mode:
authorUnknwon <joe2010xtmf@163.com>2014-11-21 10:58:08 -0500
committerUnknwon <joe2010xtmf@163.com>2014-11-21 10:58:08 -0500
commit55dfe2c97876a8af5db0fb071f002e33fb686128 (patch)
treec43f8eb741f1dd69b62888202582e4894a5da66d /templates/repo
parent3c3f7c2a56ba18d7210cc40e33e64da5219ef990 (diff)
downloadgitea-55dfe2c97876a8af5db0fb071f002e33fb686128.tar.gz
gitea-55dfe2c97876a8af5db0fb071f002e33fb686128.zip
custom avatar upload
Diffstat (limited to 'templates/repo')
-rw-r--r--templates/repo/commits_table.tmpl8
-rw-r--r--templates/repo/diff.tmpl5
-rw-r--r--templates/repo/view_list.tmpl8
3 files changed, 17 insertions, 4 deletions
diff --git a/templates/repo/commits_table.tmpl b/templates/repo/commits_table.tmpl
index d48d61a5a7..eb819e387f 100644
--- a/templates/repo/commits_table.tmpl
+++ b/templates/repo/commits_table.tmpl
@@ -24,7 +24,13 @@
{{$r := List .Commits}}
{{range $r}}
<tr>
- <td class="author"><img class="avatar-20" src="{{AvatarLink .Author.Email}}" alt=""/>&nbsp;&nbsp;&nbsp;{{if .UserName}}<a href="{{AppSubUrl}}/{{.UserName}}">{{.Author.Name}}</a>{{else}}{{.Author.Name}}{{end}}</td>
+ <td class="author">
+ {{if .User}}
+ <img class="avatar-20" src="{{.User.AvatarLink}}" alt=""/>&nbsp;&nbsp;&nbsp;<a href="{{AppSubUrl}}/{{.User.Name}}">{{.Author.Name}}</a>
+ {{else}}
+ <img class="avatar-20" src="{{AvatarLink .Author.Email}}" alt=""/>&nbsp;&nbsp;&nbsp;{{.Author.Name}}
+ {{end}}
+ </td>
<td class="sha"><a rel="nofollow" class="label label-green" href="{{AppSubUrl}}/{{$username}}/{{$reponame}}/commit/{{.Id}} ">{{SubStr .Id.String 0 10}} </a></td>
<td class="message"><span class="text-truncate">{{.Summary}}</span></td>
<td class="date">{{TimeSince .Author.When $.Lang}}</td>
diff --git a/templates/repo/diff.tmpl b/templates/repo/diff.tmpl
index 7c0d1b6bb8..8e6b1b0796 100644
--- a/templates/repo/diff.tmpl
+++ b/templates/repo/diff.tmpl
@@ -30,10 +30,11 @@
</ul>
</span>
<p class="author">
- <img class="avatar-30" src="{{AvatarLink .Commit.Author.Email}}" />
{{if .Author}}
- <a href="{{AppSubUrl}}/{{.Author}}"><strong>{{.Commit.Author.Name}}</strong></a>
+ <img class="avatar-30" src="{{.Author.AvatarLink}}" />
+ <a href="{{AppSubUrl}}/{{.Author.Name}}"><strong>{{.Commit.Author.Name}}</strong></a>
{{else}}
+ <img class="avatar-30" src="{{AvatarLink .Commit.Author.Email}}" />
<strong>{{.Commit.Author.Name}}</strong>
{{end}}
<span class="text-grey" id="authored-time">{{TimeSince .Commit.Author.When $.Lang}}</span>
diff --git a/templates/repo/view_list.tmpl b/templates/repo/view_list.tmpl
index e65d7c1134..d516eac94c 100644
--- a/templates/repo/view_list.tmpl
+++ b/templates/repo/view_list.tmpl
@@ -3,8 +3,14 @@
<tr>
<th colspan="4" class="clear">
<span class="author left">
+ {{if .LastCommitUser}}
+ <img class="avatar-24 radius" src="{{.LastCommitUser.AvatarLink}}" />
+ <a href="{{AppSubUrl}}/{{.LastCommitUser.Name}}"><strong>{{.LastCommit.Author.Name}}</strong></a>:
+ {{else}}
<img class="avatar-24 radius" src="{{AvatarLink .LastCommit.Author.Email}}" />
- {{if .LastCommitUser}}<a href="{{AppSubUrl}}/{{.LastCommitUser}}">{{end}}<strong>{{.LastCommit.Author.Name}}</strong>:{{if .LastCommitUser}}</a>{{end}}
+ <strong>{{.LastCommit.Author.Name}}</strong>:
+ {{end}}
+ &nbsp;
</span>
<span class="last-commit"><a href="{{.RepoLink}}/commit/{{.LastCommit.Id}}" rel="nofollow">
<strong>{{ShortSha .LastCommit.Id.String}}</strong></a>