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.

commit_page.tmpl 5.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. {{template "base/head" .}}
  2. <div class="repository diff">
  3. {{template "repo/header" .}}
  4. <div class="ui container {{if .IsSplitStyle}}fluid padded{{end}}">
  5. <div class="ui top attached info clearing segment {{if .Commit.Signature}} isSigned {{if .Verification.Verified }} isVerified {{end}}{{end}}">
  6. <a class="ui floated right blue tiny button" href="{{EscapePound .SourcePath}}">
  7. {{.i18n.Tr "repo.diff.browse_source"}}
  8. </a>
  9. <h3 class="has-emoji">{{RenderCommitMessage .Commit.Message $.RepoLink $.Repository.ComposeMetas}}{{template "repo/commit_status" .CommitStatus}}</h3>
  10. {{if IsMultilineCommitMessage .Commit.Message}}
  11. <pre class="commit-body">{{RenderCommitBody .Commit.Message $.RepoLink $.Repository.ComposeMetas}}</pre>
  12. {{end}}
  13. <span class="text grey"><i class="octicon octicon-git-branch"></i>{{.BranchName}}</span>
  14. </div>
  15. <div class="ui attached info segment {{if .Commit.Signature}} isSigned {{if .Verification.Verified }} isVerified {{end}}{{end}}">
  16. <div class="ui stackable grid">
  17. <div class="nine wide column">
  18. {{if .Author}}
  19. <img class="ui avatar image" src="{{.Author.RelAvatarLink}}" />
  20. {{if .Author.FullName}}
  21. <a href="{{.Author.HomeLink}}"><strong>{{.Author.FullName}}</strong></a> {{if .IsSigned}}<{{.Commit.Author.Email}}>{{end}}
  22. {{else}}
  23. <a href="{{.Author.HomeLink}}"><strong>{{.Commit.Author.Name}}</strong></a> {{if .IsSigned}}<{{.Commit.Author.Email}}>{{end}}
  24. {{end}}
  25. {{else}}
  26. <img class="ui avatar image" src="{{AvatarLink .Commit.Author.Email}}" />
  27. <strong>{{.Commit.Author.Name}}</strong>
  28. {{end}}
  29. {{if or (ne .Commit.Committer.Name .Commit.Author.Name) (ne .Commit.Committer.Email .Commit.Author.Email)}}
  30. <span> </span>
  31. {{if ne .Verification.CommittingUser.ID 0}}
  32. <img class="ui avatar image" src="{{.Verification.CommittingUser.RelAvatarLink}}" />
  33. <a href="{{.Verification.CommittingUser.HomeLink}}"><strong>{{.Commit.Committer.Name}}</strong></a> <{{.Commit.Committer.Email}}>
  34. {{else}}
  35. <img class="ui avatar image" src="{{AvatarLink .Commit.Committer.Email}}" />
  36. <strong>{{.Commit.Committer.Name}}</strong>
  37. {{end}}
  38. {{end}}
  39. <span class="text grey" id="authored-time">{{TimeSince .Commit.Author.When $.Lang}}</span>
  40. </div>
  41. <div class="seven wide right aligned column">
  42. <div class="ui horizontal list">
  43. {{if .Parents}}
  44. <div class="item">
  45. {{.i18n.Tr "repo.diff.parent"}}
  46. </div>
  47. <div class="item">
  48. {{range .Parents}}
  49. <a class="ui blue sha label" href="{{$.RepoLink}}/commit/{{.}}">{{ShortSha .}}</a>
  50. {{end}}
  51. </div>
  52. {{end}}
  53. <div class="mobile-only"></div>
  54. <div class="item">{{.i18n.Tr "repo.diff.commit"}}</div>
  55. <div class="item"><span class="ui blue sha label">{{ShortSha .CommitID}}</span></div>
  56. </div>
  57. </div><!-- end column -->
  58. </div><!-- end grid -->
  59. </div>
  60. {{if .Commit.Signature}}
  61. {{if .Verification.Verified }}
  62. <div class="ui bottom attached positive message">
  63. {{if ne .Verification.SigningUser.ID 0}}
  64. <i class="green lock icon"></i>
  65. <span>{{.i18n.Tr "repo.commits.signed_by"}}:</span>
  66. <img class="ui avatar image" src="{{.Verification.SigningUser.RelAvatarLink}}" />
  67. <a href="{{.Verification.SigningUser.HomeLink}}"><strong>{{.Verification.SigningUser.Name}}</strong></a> <{{.Verification.SigningEmail}}>
  68. <span class="pull-right"><span>{{.i18n.Tr "repo.commits.gpg_key_id"}}:</span> {{.Verification.SigningKey.KeyID}}</span>
  69. {{else}}
  70. <i class="icons" title="{{.i18n.Tr "gpg.default_key"}}">
  71. <i class="green lock icon"></i>
  72. <i class="tiny inverted cog icon centerlock"></i>
  73. </i>
  74. <span>{{.i18n.Tr "repo.commits.signed_by"}}:</span>
  75. <img class="ui avatar image" src="{{AvatarLink .Verification.SigningEmail}}" />
  76. <strong>{{.Verification.SigningUser.Name}}</strong> <{{.Verification.SigningEmail}}>
  77. <span class="pull-right"><span>{{.i18n.Tr "repo.commits.gpg_key_id"}}:</span> <i class="cogs icon" title="{{.i18n.Tr "gpg.default_key"}}"></i>{{.Verification.SigningKey.KeyID}}</span>
  78. {{end}}
  79. </div>
  80. {{else if .Verification.Warning}}
  81. <div class="ui bottom attached message">
  82. <i class="red unlock icon"></i>
  83. <span class="red text">{{.i18n.Tr .Verification.Reason}}</span>
  84. <span class="pull-right"><span class="red text">{{.i18n.Tr "repo.commits.gpg_key_id"}}:</span> <i class="red warning icon"></i>{{.Verification.SigningKey.KeyID}}</span>
  85. </div>
  86. {{else}}
  87. <div class="ui bottom attached message">
  88. <i class="grey unlock icon"></i>
  89. {{.i18n.Tr .Verification.Reason}}
  90. {{if and .Verification.SigningKey (ne .Verification.SigningKey.KeyID "")}}
  91. <span class="pull-right"><span class="red text">{{.i18n.Tr "repo.commits.gpg_key_id"}}:</span> <i class="red warning icon"></i>{{.Verification.SigningKey.KeyID}}</span>
  92. {{end}}
  93. </div>
  94. {{end}}
  95. {{end}}
  96. {{if .Note}}
  97. <div class="ui top attached info segment message git-notes">
  98. <i class="sticky note icon"></i>
  99. {{.i18n.Tr "repo.diff.git-notes"}}:
  100. {{if .NoteAuthor}}
  101. <a href="{{.NoteAuthor.HomeLink}}">
  102. {{if .NoteAuthor.FullName}}
  103. <strong>{{.NoteAuthor.FullName}}</strong>
  104. {{else}}
  105. <strong>{{.NoteCommit.Author.Name}}</strong>
  106. {{end}}
  107. </a>
  108. {{else}}
  109. <strong>{{.NoteCommit.Author.Name}}</strong>
  110. {{end}}
  111. <span class="text grey" id="note-authored-time">{{TimeSince .NoteCommit.Author.When $.Lang}}</span>
  112. </div>
  113. <div class="ui bottom attached info segment git-notes">
  114. <pre class="commit-body">{{RenderNote .Note $.RepoLink $.Repository.ComposeMetas}}</pre>
  115. </div>
  116. {{end}}
  117. {{template "repo/diff/box" .}}
  118. </div>
  119. </div>
  120. {{template "base/footer" .}}