diff --git a/templates/repo/commits_list.tmpl b/templates/repo/commits_list.tmpl index 2c0a93f2ba..250e60f888 100644 --- a/templates/repo/commits_list.tmpl +++ b/templates/repo/commits_list.tmpl @@ -76,27 +76,60 @@ {{else}} {{DateUtils.TimeSince .Author.When}} {{end}} - - - {{if not $.PageIsWiki}} - {{if $.FileName}} - - {{svg "octicon-file-diff"}} - - {{end}} - - {{svg "octicon-file-code"}} - - {{end}} - - + {{end}} + {{$commitShaLink := ""}} + {{if $.PageIsWiki}} + {{$commitShaLink = (printf "%s/wiki/commit/%s" $commitRepoLink (PathEscape .ID.String))}} + {{else if $.PageIsPullCommits}} + {{$commitShaLink = (printf "%s/pulls/%d/commits/%s" $commitRepoLink $.Issue.Index (PathEscape .ID.String))}} + {{else if $.Reponame}} + {{$commitShaLink = (printf "%s/commit/%s" $commitRepoLink (PathEscape .ID.String))}} + {{end}} + + {{ShortSha .ID.String}} + {{if .Signature}}{{template "repo/shabox_badge" dict "root" $ "verification" .Verification}}{{end}} + + +
+ {{$userName := .Author.Name}} + + {{if .User}} + {{if and .User.FullName DefaultShowFullName}} + {{$userName = .User.FullName}} + {{end}} + {{ctx.AvatarUtils.Avatar .User 28 "tw-mr-2"}}{{$userName}} + {{else}} + {{ctx.AvatarUtils.AvatarByEmail .Author.Email .Author.Name 28 "tw-mr-2"}} + {{$userName}} + {{end}} +
+ + +
+ {{$commitLink:= printf "%s/commit/%s" $commitRepoLink (PathEscape .ID.String)}} +
{{RenderCommitMessageLinkSubject $.Context .Message $commitLink ($.Repository.ComposeMetas ctx)}}
+ {{if IsMultilineCommitMessage .Message}} + +
{{RenderCommitBody $.Context .Message ($.Repository.ComposeMetas ctx)}}
{{end}} - - -
+ {{template "repo/commit_statuses" dict "Status" .Status "Statuses" .Statuses}} + + +
+ {{if .Committer}}{{DateUtils.TimeSince .Committer.When}}{{else}}{{DateUtils.TimeSince .Author.When}}{{end}} +
+ + +
+ + {{if not $.PageIsWiki}} + {{if $.FileName}} + {{svg "octicon-file-diff"}} + {{end}} + {{svg "octicon-file-code"}} + {{end}} +
+ + {{end}} + +