list.tmpl 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. {{template "base/head" .}}
  2. <div class="repository release">
  3. {{template "repo/header" .}}
  4. <div class="ui container">
  5. {{template "base/alert" .}}
  6. <h2 class="ui header">
  7. {{.i18n.Tr "repo.release.releases"}}
  8. {{if .IsRepositoryAdmin}}
  9. <div class="ui right">
  10. <a class="ui small green button" href="{{$.RepoLink}}/releases/new">
  11. {{.i18n.Tr "repo.release.new_release"}}
  12. </a>
  13. </div>
  14. {{end}}
  15. </h2>
  16. <ul id="release-list">
  17. {{range .Releases}}
  18. <li class="ui grid">
  19. <div class="ui four wide column meta">
  20. {{if .PublisherID}}
  21. {{if .IsDraft}}
  22. <span class="ui yellow label">{{$.i18n.Tr "repo.release.draft"}}</span>
  23. {{else if .IsPrerelease}}
  24. <span class="ui orange label">{{$.i18n.Tr "repo.release.prerelease"}}</span>
  25. {{else}}
  26. <span class="ui green label">{{$.i18n.Tr "repo.release.stable"}}</span>
  27. {{end}}
  28. <span class="tag text blue">
  29. <a href="{{$.RepoLink}}/src/{{.TagName}}" rel="nofollow"><i class="tag icon"></i> {{.TagName}}</a>
  30. </span>
  31. {{end}}
  32. <span class="commit">
  33. <a href="{{$.RepoLink}}/src/{{.Sha1}}" rel="nofollow"><i class="code icon"></i> {{ShortSha .Sha1}}</a>
  34. </span>
  35. </div>
  36. <div class="ui twelve wide column detail">
  37. {{if .PublisherID}}
  38. <h3>
  39. <a href="{{$.RepoLink}}/src/{{.TagName}}">{{.Title}}</a>
  40. {{if $.IsRepositoryAdmin}}<small>(<a href="{{$.RepoLink}}/releases/edit/{{.TagName}}" rel="nofollow">{{$.i18n.Tr "repo.release.edit"}}</a>)</small>{{end}}
  41. </h3>
  42. <p class="text grey">
  43. <span class="author">
  44. <img class="img-10" src="{{.Publisher.AvatarLink}}">
  45. <a href="{{AppSubUrl}}/{{.Publisher.Name}}">{{.Publisher.Name}}</a>
  46. </span>
  47. {{if .Created}}<span class="time">{{TimeSince .Created $.Lang}}</span>{{end}}
  48. <span class="ahead">{{$.i18n.Tr "repo.release.ahead" .NumCommitsBehind .Target | Str2html}}</span>
  49. </p>
  50. <div class="markdown desc">
  51. {{Str2html .Note}}
  52. </div>
  53. <div class="download">
  54. <h2>{{$.i18n.Tr "repo.release.downloads"}}</h2>
  55. <ul class="list">
  56. <li>
  57. <a href="{{$.RepoLink}}/archive/{{.TagName}}.zip" rel="nofollow"><i class="icon octicon octicon-file-zip"></i> {{$.i18n.Tr "repo.release.source_code"}} (ZIP)</a>
  58. </li>
  59. <li>
  60. <a href="{{$.RepoLink}}/archive/{{.TagName}}.tar.gz"><i class="icon octicon octicon-file-zip"></i> {{$.i18n.Tr "repo.release.source_code"}} (TAR.GZ)</a>
  61. </li>
  62. </ul>
  63. </div>
  64. {{else}}
  65. <h4>
  66. <a href="{{$.RepoLink}}/src/{{.TagName}}" rel="nofollow"><i class="tag icon"></i> {{.TagName}}</a>
  67. </h4>
  68. <div class="download">
  69. <a href="{{$.RepoLink}}/archive/{{.TagName}}.zip" rel="nofollow"><i class="octicon octicon-file-zip"></i> ZIP</a>
  70. <a href="{{$.RepoLink}}/archive/{{.TagName}}.tar.gz"><i class="octicon octicon-file-zip"></i> TAR.GZ</a>
  71. </div>
  72. {{end}}
  73. <span class="dot">&nbsp;</span>
  74. </div>
  75. </li>
  76. {{end}}
  77. </ul>
  78. </div>
  79. </div>
  80. {{template "base/footer" .}}