diff --git a/templates/repo/commits_list.tmpl b/templates/repo/commits_list.tmpl index 8a268a5d14cd2..6001180734d2a 100644 --- a/templates/repo/commits_list.tmpl +++ b/templates/repo/commits_list.tmpl @@ -1,89 +1,79 @@
{{ctx.Locale.Tr "repo.commits.author"}} | -{{StringUtils.ToUpper $.Repository.ObjectFormatName}} | - -{{ctx.Locale.Tr "repo.commits.date"}} | -- | |
---|---|---|---|---|
-
- {{$userName := .Author.Name}}
- {{if .User}}
- {{if and .User.FullName DefaultShowFullName}}
- {{$userName = .User.FullName}}
- {{end}}
- {{ctx.AvatarUtils.Avatar .User 28 "tw-mr-2"}}{{$userName}}
+
+ {{$commitRepoLink := $.RepoLink}}{{if $.CommitRepoLink}}{{$commitRepoLink = $.CommitRepoLink}}{{end}}
+ {{range .Commits}}
+
+
+
+
- |
- - {{$commitBaseLink := ""}} - {{if $.PageIsWiki}} - {{$commitBaseLink = printf "%s/wiki/commit" $commitRepoLink}} - {{else if $.PageIsPullCommits}} - {{$commitBaseLink = printf "%s/pulls/%d/commits" $commitRepoLink $.Issue.Index}} - {{else if $.Reponame}} - {{$commitBaseLink = printf "%s/commit" $commitRepoLink}} - {{end}} - {{template "repo/commit_sign_badge" dict "Commit" . "CommitBaseLink" $commitBaseLink "CommitSignVerification" .Verification}} - | - - {{if .Committer}} -{{DateUtils.TimeSince .Committer.When}} | - {{else}} -{{DateUtils.TimeSince .Author.When}} | + + {{if IsMultilineCommitMessage .Message}} +
-
- {{/* at the moment, wiki doesn't support these "view" links like "view at history point" */}}
- {{if not $.PageIsWiki}}
- {{/* view single file diff */}}
- {{if $.FileTreePath}}
- {{svg "octicon-file-diff"}}
+
+ {{$userName := .Author.Name}}
+ {{if .User}}
+ {{if and .User.FullName DefaultShowFullName}}
+ {{$userName = .User.FullName}}
{{end}}
-
- {{/* view at history point */}}
- {{$viewCommitLink := printf "%s/src/commit/%s" $commitRepoLink (PathEscape .ID.String)}}
- {{if $.FileTreePath}}{{$viewCommitLink = printf "%s/%s" $viewCommitLink (PathEscapeSegments $.FileTreePath)}}{{end}}
- {{svg "octicon-file-code"}}
+ {{ctx.AvatarUtils.Avatar .User 20}}
+ {{$userName}}
+ {{else}}
+ {{ctx.AvatarUtils.AvatarByEmail .Author.Email .Author.Name 28 "tw-mr-2"}}
+
{{end}}
- |
-