diff.tmpl 1.6 KB

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