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.

90 lines
3.4 KiB

9 years ago
10 years ago
  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 .IsRepositoryWriter}}
  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 $.IsRepositoryWriter}}<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.RelAvatarLink}}">
  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="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="octicon octicon-file-zip"></i> {{$.i18n.Tr "repo.release.source_code"}} (TAR.GZ)</a>
  61. </li>
  62. {{if .Attachments}}
  63. {{range .Attachments}}
  64. <li>
  65. <a target="_blank" rel="noopener" href="{{AppSubUrl}}/attachments/{{.UUID}}">
  66. <span class="ui image octicon octicon-desktop-download" title='{{.Name}}'></span> {{.Name}}
  67. </a>
  68. </li>
  69. {{end}}
  70. {{end}}
  71. </ul>
  72. </div>
  73. {{else}}
  74. <h4>
  75. <a href="{{$.RepoLink}}/src/{{.TagName}}" rel="nofollow"><i class="tag icon"></i> {{.TagName}}</a>
  76. </h4>
  77. <div class="download">
  78. <a href="{{$.RepoLink}}/archive/{{.TagName}}.zip" rel="nofollow"><i class="octicon octicon-file-zip"></i> ZIP</a>
  79. <a href="{{$.RepoLink}}/archive/{{.TagName}}.tar.gz"><i class="octicon octicon-file-zip"></i> TAR.GZ</a>
  80. </div>
  81. {{end}}
  82. <span class="dot">&nbsp;</span>
  83. </div>
  84. </li>
  85. {{end}}
  86. </ul>
  87. {{template "base/paginate" .}}
  88. </div>
  89. </div>
  90. {{template "base/footer" .}}