You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

commits_list_small.tmpl 2.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. {{ $index := 0}}
  2. <div class="timeline-item commits-list">
  3. {{range .comment.Commits}}
  4. {{ $tag := printf "%s-%d" $.comment.HashTag $index }}
  5. {{ $index = Add $index 1}}
  6. <div class="singular-commit" id="{{$tag}}">
  7. <span class="badge badge-commit">{{svg "octicon-git-commit"}}</span>
  8. {{if .User}}
  9. <a href="{.User.HomeLink}}">
  10. {{avatar .User}}
  11. </a>
  12. {{else}}
  13. {{avatarByEmail .Author.Email .Author.Name}}
  14. {{end}}
  15. <span class="ui float right shabox">
  16. {{template "repo/commit_statuses" dict "Status" .Status "Statuses" .Statuses "root" $.root}}
  17. {{$class := "ui sha label"}}
  18. {{if .Signature}}
  19. {{$class = (printf "%s%s" $class " isSigned")}}
  20. {{if .Verification.Verified}}
  21. {{if eq .Verification.TrustStatus "trusted"}}
  22. {{$class = (printf "%s%s" $class " isVerified")}}
  23. {{else if eq .Verification.TrustStatus "untrusted"}}
  24. {{$class = (printf "%s%s" $class " isVerifiedUntrusted")}}
  25. {{else}}
  26. {{$class = (printf "%s%s" $class " isVerifiedUnmatched")}}
  27. {{end}}
  28. {{else if .Verification.Warning}}
  29. {{$class = (printf "%s%s" $class " isWarning")}}
  30. {{end}}
  31. {{end}}
  32. {{if $.comment.Issue.PullRequest.BaseRepo.Name}}
  33. <a href="{{$.comment.Issue.PullRequest.BaseRepo.Link}}/commit/{{PathEscape .ID.String}}" rel="nofollow" class="{{$class}}">
  34. {{else}}
  35. <span class="{{$class}}">
  36. {{end}}
  37. <span class="shortsha">{{ShortSha .ID.String}}</span>
  38. {{if .Signature}}
  39. {{template "repo/shabox_badge" dict "root" $.root "verification" .Verification}}
  40. {{end}}
  41. {{if $.comment.Issue.PullRequest.BaseRepo.Name}}
  42. </a>
  43. {{else}}
  44. </span>
  45. {{end}}
  46. </span>
  47. {{ $commitLink:= printf "%s/commit/%s" $.comment.Issue.PullRequest.BaseRepo.Link (PathEscape .ID.String) }}
  48. <span class="mono commit-summary {{if gt .ParentCount 1}} grey text{{end}}" title="{{.Summary}}">{{RenderCommitMessageLinkSubject .Message ($.comment.Issue.PullRequest.BaseRepo.Link|Escape) $commitLink $.comment.Issue.PullRequest.BaseRepo.ComposeMetas}}</span>
  49. {{if IsMultilineCommitMessage .Message}}
  50. <button class="basic compact mini ui icon button commit-button"><i class="ellipsis horizontal icon"></i></button>
  51. {{end}}
  52. {{if IsMultilineCommitMessage .Message}}
  53. <pre class="commit-body" style="display: none;">{{RenderCommitBody .Message ($.comment.Issue.PullRequest.BaseRepo.Link|Escape) $.comment.Issue.PullRequest.BaseRepo.ComposeMetas}}</pre>
  54. {{end}}
  55. </div>
  56. {{end}}
  57. </div>