diff --git a/templates/repo/commits_list.tmpl b/templates/repo/commits_list.tmpl index bae99241413e7..1376335617028 100644 --- a/templates/repo/commits_list.tmpl +++ b/templates/repo/commits_list.tmpl @@ -1,92 +1,91 @@
{{ctx.Locale.Tr "repo.commits.author"}} | +{{StringUtils.ToUpper $.Repository.ObjectFormatName}} | + +{{ctx.Locale.Tr "repo.commits.date"}} | ++ | |||
---|---|---|---|---|---|---|
{{ctx.Locale.Tr "repo.commits.author"}} | -{{StringUtils.ToUpper $.Repository.ObjectFormatName}} | - -{{ctx.Locale.Tr "repo.commits.date"}} | -- | |||
- {{$userName := .Author.Name}} - {{if .User}} - {{if .User.FullName}} - {{$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 := .Author.Name}} + {{if .User}} + {{if .User.FullName}} + {{$userName = .User.FullName}} {{end}} - | -- {{$class := "ui sha label"}} - {{if .Signature}} - {{$class = (print $class " isSigned")}} - {{if .Verification.Verified}} - {{if eq .Verification.TrustStatus "trusted"}} - {{$class = (print $class " isVerified")}} - {{else if eq .Verification.TrustStatus "untrusted"}} - {{$class = (print $class " isVerifiedUntrusted")}} - {{else}} - {{$class = (print $class " isVerifiedUnmatched")}} - {{end}} - {{else if .Verification.Warning}} - {{$class = (print $class " isWarning")}} + {{ctx.AvatarUtils.Avatar .User 28 "tw-mr-2"}}{{$userName}} + {{else}} + {{ctx.AvatarUtils.AvatarByEmail .Author.Email .Author.Name 28 "tw-mr-2"}} + + {{end}} + | ++ {{$class := "ui sha label"}} + {{if .Signature}} + {{$class = (print $class " isSigned")}} + {{if .Verification.Verified}} + {{if eq .Verification.TrustStatus "trusted"}} + {{$class = (print $class " isVerified")}} + {{else if eq .Verification.TrustStatus "untrusted"}} + {{$class = (print $class " isVerifiedUntrusted")}} + {{else}} + {{$class = (print $class " isVerifiedUnmatched")}} {{end}} + {{else if .Verification.Warning}} + {{$class = (print $class " isWarning")}} {{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}} - - | - - {{if .Committer}} -{{TimeSince .Committer.When ctx.Locale}} | + {{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}} + + +{{TimeSince .Author.When ctx.Locale}} | + {{$commitLink:= printf "%s/commit/%s" $commitRepoLink (PathEscape .ID.String)}} + {{RenderCommitMessageLinkSubject $.Context .Message $commitLink ($.Repository.ComposeMetas ctx)}} + {{end}} + + {{if IsMultilineCommitMessage .Message}} + {{end}} -- - - {{svg "octicon-file-code"}} - - | -
{{RenderCommitBody $.Context .Message ($.Repository.ComposeMetas ctx)}}+ {{end}} + + {{if .Committer}} +