diff.tmpl 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. {{template "base/head" .}}
  2. <div class="repository diff">
  3. {{template "repo/header" .}}
  4. <div class="ui container">
  5. {{if .IsDiffCompare }}
  6. {{template "repo/commits_table" .}}
  7. {{else}}
  8. <h4 class="ui top attached info header">
  9. <div class="ui right">
  10. <a class="ui blue tiny button" href="{{EscapePound .SourcePath}}">
  11. {{.i18n.Tr "repo.diff.browse_source"}}
  12. </a>
  13. </div>
  14. {{RenderCommitMessage .Commit.Message $.RepoLink}}
  15. </h4>
  16. <div class="ui attached info segment">
  17. {{if .Author}}
  18. <img class="ui avatar image" src="{{.Author.AvatarLink}}" />
  19. <a href="{{.Author.HomeLink}}"><strong>{{.Commit.Author.Name}}</strong></a>
  20. {{else}}
  21. <img class="ui avatar image" src="{{AvatarLink .Commit.Author.Email}}" />
  22. <strong>{{.Commit.Author.Name}}</strong>
  23. {{end}}
  24. <span class="text grey" id="authored-time">{{TimeSince .Commit.Author.When $.Lang}}</span>
  25. <div class="ui right">
  26. <div class="ui horizontal list">
  27. {{if .Parents}}
  28. <div class="item">
  29. {{.i18n.Tr "repo.diff.parent"}}
  30. </div>
  31. <div class="item">
  32. {{range .Parents}}
  33. <a class="ui blue sha label" href="{{$.RepoLink}}/commit/{{.}}">{{ShortSha .}}</a>
  34. {{end}}
  35. </div>
  36. {{end}}
  37. <div class="item">{{.i18n.Tr "repo.diff.commit"}}</div>
  38. <div class="item"><span class="ui blue sha label">{{ShortSha .CommitID}}</span></div>
  39. </div>
  40. </div>
  41. </div>
  42. {{end}}
  43. {{template "repo/diff_box" .}}
  44. </div>
  45. </div>
  46. {{template "base/footer" .}}