diff --git a/templates/repo/commits_list.tmpl b/templates/repo/commits_list.tmpl
index 250e60f888..f4c10e62f0 100644
--- a/templates/repo/commits_list.tmpl
+++ b/templates/repo/commits_list.tmpl
@@ -28,6 +28,21 @@
+ {{$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}}
+ {{end}}
{{$commitShaLink := ""}}
{{if $.PageIsWiki}}
{{$commitShaLink = (printf "%s/wiki/commit/%s" $commitRepoLink (PathEscape .ID.String))}}
@@ -36,12 +51,10 @@
{{else if $.Reponame}}
{{$commitShaLink = (printf "%s/commit/%s" $commitRepoLink (PathEscape .ID.String))}}
{{end}}
- {{template "repo/shabox" (dict
- "sha1" .ID.String
- "commitLink" $commitShaLink
- "signature" .Signature
- "verification" .Verification
- )}}
+
+ {{ShortSha .ID.String}}
+ {{if .Signature}}{{template "repo/shabox_badge" dict "root" $ "verification" .Verification}}{{end}}
+
|
@@ -76,60 +89,27 @@
{{else}}
| {{DateUtils.TimeSince .Author.When}} |
{{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)}}
+
+
+ {{if not $.PageIsWiki}}
+ {{if $.FileName}}
+
+ {{svg "octicon-file-diff"}}
+
+ {{end}}
+
+ {{svg "octicon-file-code"}}
+
+ {{end}}
+ |
+
{{end}}
- {{template "repo/commit_statuses" dict "Status" .Status "Statuses" .Statuses}}
-
-
-
- {{if .Committer}}{{DateUtils.TimeSince .Committer.When}}{{else}}{{DateUtils.TimeSince .Author.When}}{{end}}
-
-
-
-
-
- {{end}}
-
-
+
+
+
diff --git a/templates/repo/pulls/commits.tmpl b/templates/repo/pulls/commits.tmpl
index bf6e8128d4..ba5d7ea931 100644
--- a/templates/repo/pulls/commits.tmpl
+++ b/templates/repo/pulls/commits.tmpl
@@ -4,7 +4,7 @@
{{template "repo/issue/view_title" .}}
{{template "repo/pulls/tab_menu" .}}
- {{template "repo/commits_table" .}}
+ {{template "repo/pulls/commits_table" .}}
{{template "base/footer" .}}
diff --git a/templates/repo/pulls/commits_list.tmpl b/templates/repo/pulls/commits_list.tmpl
new file mode 100644
index 0000000000..0a007153c1
--- /dev/null
+++ b/templates/repo/pulls/commits_list.tmpl
@@ -0,0 +1,97 @@
+
+ {{$commitRepoLink := $.RepoLink}}{{if $.CommitRepoLink}}{{$commitRepoLink = $.CommitRepoLink}}{{end}}
+ {{$prevDate := ""}}
+ {{range .Commits}}
+ {{$commitTime := .Committer.When}}
+ {{if not $commitTime}}{{$commitTime = .Author.When}}{{end}}
+ {{$commitDate := $commitTime.Format "2006-01-02"}}
+ {{if ne $commitDate $prevDate}}
+ {{if ne $prevDate ""}}
{{end}}
+ {{$prevDate = $commitDate}}
+
+
+
+
+
{{ $commitTime.Format "Mon, 02 Jan 2006" }}
+
+
+
+ {{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}}
+
+
+
+ {{$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}}
+ {{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}}{{DateUtils.TimeSince .Committer.When}}{{else}}{{DateUtils.TimeSince .Author.When}}{{end}}
+
+
+
+
+
+ {{end}}
+
+