Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

commits_list.tmpl 3.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. <div class="ui attached table segment">
  2. <table class="ui very basic striped fixed table single line" id="commits-table">
  3. <thead>
  4. <tr>
  5. <th class="four wide">{{.i18n.Tr "repo.commits.author"}}</th>
  6. <th class="two wide sha">SHA1</th>
  7. <th class="seven wide message">{{.i18n.Tr "repo.commits.message"}}</th>
  8. <th class="three wide right aligned">{{.i18n.Tr "repo.commits.date"}}</th>
  9. </tr>
  10. </thead>
  11. <tbody class="commit-list">
  12. {{range .Commits}}
  13. <tr>
  14. <td class="author">
  15. {{$userName := .Author.Name}}
  16. {{if .User}}
  17. {{if .User.FullName}}
  18. {{$userName = .User.FullName}}
  19. {{end}}
  20. {{avatar .User 28 "mr-2"}}<a href="{{.User.HomeLink}}">{{$userName}}</a>
  21. {{else}}
  22. {{avatarByEmail .Author.Email .Author.Name 28 "mr-2"}}
  23. {{$userName}}
  24. {{end}}
  25. </td>
  26. <td class="sha">
  27. {{$class := "ui sha label"}}
  28. {{if .Signature}}
  29. {{$class = (printf "%s%s" $class " isSigned")}}
  30. {{if .Verification.Verified}}
  31. {{if eq .Verification.TrustStatus "trusted"}}
  32. {{$class = (printf "%s%s" $class " isVerified")}}
  33. {{else if eq .Verification.TrustStatus "untrusted"}}
  34. {{$class = (printf "%s%s" $class " isVerifiedUntrusted")}}
  35. {{else}}
  36. {{$class = (printf "%s%s" $class " isVerifiedUnmatched")}}
  37. {{end}}
  38. {{else if .Verification.Warning}}
  39. {{$class = (printf "%s%s" $class " isWarning")}}
  40. {{end}}
  41. {{end}}
  42. {{if $.PageIsWiki}}
  43. <a href="{{$.RepoLink}}/wiki/commit/{{.ID}}" rel="nofollow" class="{{$class}}">
  44. {{else if $.Reponame}}
  45. <a href="{{$.RepoLink}}/commit/{{.ID}}" rel="nofollow" class="{{$class}}">
  46. {{else}}
  47. <span class="{{$class}}">
  48. {{end}}
  49. <span class="shortsha">{{ShortSha .ID.String}}</span>
  50. {{if .Signature}}
  51. {{template "repo/shabox_badge" dict "root" $ "verification" .Verification}}
  52. {{end}}
  53. {{if $.Reponame}}
  54. </a>
  55. {{else}}
  56. </span>
  57. {{end}}
  58. </td>
  59. <td class="message">
  60. <span class="message-wrapper">
  61. {{if $.PageIsWiki}}
  62. <span class="commit-summary {{if gt .ParentCount 1}} grey text{{end}}" title="{{.Summary}}">{{.Summary | RenderEmoji}}</span>
  63. {{else }}
  64. {{ $commitLink:= printf "%s/commit/%s" $.RepoLink (PathEscape .ID.String) }}
  65. <span class="commit-summary {{if gt .ParentCount 1}} grey text{{end}}" title="{{.Summary}}">{{RenderCommitMessageLinkSubject .Message $.RepoLink $commitLink $.Repository.ComposeMetas}}</span>
  66. {{end}}
  67. </span>
  68. {{if IsMultilineCommitMessage .Message}}
  69. <button class="basic compact mini ui icon button commit-button"><i class="ellipsis horizontal icon"></i></button>
  70. {{end}}
  71. {{template "repo/commit_statuses" dict "Status" .Status "Statuses" .Statuses "root" $}}
  72. {{if IsMultilineCommitMessage .Message}}
  73. <pre class="commit-body" style="display: none;">{{RenderCommitBody .Message $.RepoLink $.Repository.ComposeMetas}}</pre>
  74. {{end}}
  75. </td>
  76. <td class="text right aligned">{{TimeSince .Author.When $.Lang}}</td>
  77. </tr>
  78. {{end}}
  79. </tbody>
  80. </table>
  81. </div>