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 3.8KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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. <span class="text grey" id="authored-time">{{TimeSince .Commit.Author.When $.Lang}}</span>
  30. </div>
  31. <div class="seven wide right aligned column">
  32. <div class="ui horizontal list">
  33. {{if .Parents}}
  34. <div class="item">
  35. {{.i18n.Tr "repo.diff.parent"}}
  36. </div>
  37. <div class="item">
  38. {{range .Parents}}
  39. <a class="ui blue sha label" href="{{$.RepoLink}}/commit/{{.}}">{{ShortSha .}}</a>
  40. {{end}}
  41. </div>
  42. {{end}}
  43. <div class="mobile-only"></div>
  44. <div class="item">{{.i18n.Tr "repo.diff.commit"}}</div>
  45. <div class="item"><span class="ui blue sha label">{{ShortSha .CommitID}}</span></div>
  46. </div>
  47. </div><!-- end column -->
  48. </div><!-- end grid -->
  49. </div>
  50. {{if .Commit.Signature}}
  51. {{if .Verification.Verified }}
  52. <div class="ui bottom attached positive message">
  53. <i class="green lock icon"></i>
  54. <span>{{.i18n.Tr "repo.commits.signed_by"}}:</span>
  55. <a href="{{.Verification.SigningUser.HomeLink}}"><strong>{{.Commit.Committer.Name}}</strong></a> <{{.Commit.Committer.Email}}>
  56. <span class="pull-right"><span>{{.i18n.Tr "repo.commits.gpg_key_id"}}:</span> {{.Verification.SigningKey.KeyID}}</span>
  57. </div>
  58. {{else}}
  59. <div class="ui bottom attached message">
  60. <i class="grey unlock icon"></i>
  61. {{.i18n.Tr .Verification.Reason}}
  62. </div>
  63. {{end}}
  64. {{end}}
  65. {{if .Note}}
  66. <div class="ui top attached info segment message git-notes">
  67. <i class="sticky note icon"></i>
  68. {{.i18n.Tr "repo.diff.git-notes"}}:
  69. {{if .NoteAuthor}}
  70. <a href="{{.NoteAuthor.HomeLink}}">
  71. {{if .NoteAuthor.FullName}}
  72. <strong>{{.NoteAuthor.FullName}}</strong>
  73. {{else}}
  74. <strong>{{.NoteCommit.Author.Name}}</strong>
  75. {{end}}
  76. </a>
  77. {{else}}
  78. <strong>{{.NoteCommit.Author.Name}}</strong>
  79. {{end}}
  80. <span class="text grey" id="note-authored-time">{{TimeSince .NoteCommit.Author.When $.Lang}}</span>
  81. </div>
  82. <div class="ui bottom attached info segment git-notes">
  83. <pre class="commit-body">{{RenderNote .Note $.RepoLink $.Repository.ComposeMetas}}</pre>
  84. </div>
  85. {{end}}
  86. {{template "repo/diff/box" .}}
  87. </div>
  88. </div>
  89. {{template "base/footer" .}}