page.tmpl 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. <div class="commit-message">
  13. {{RenderCommitMessage true .Commit.Message $.RepoLink $.Repository.ComposeMetas | Str2HTML}}
  14. </div>
  15. </div>
  16. <div class="ui attached info segment">
  17. {{if .Author}}
  18. <img class="ui avatar image" src="{{.Author.RelAvatarLink}}" />
  19. <a href="{{.Author.HomeLink}}"><strong>{{.Commit.Author.Name}}</strong></a> {{if .IsLogged}}<{{.Commit.Author.Email}}>{{end}}
  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/{{.}}">{{ShortSHA1 .}}</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">{{ShortSHA1 .CommitID}}</span></div>
  39. </div>
  40. </div>
  41. </div>
  42. {{end}}
  43. {{template "repo/diff/box" .}}
  44. </div>
  45. </div>
  46. {{template "base/footer" .}}