本站源代码
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

106 lines
4.4KB

  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 .CanCreateRelease}}
  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 $release := .Releases}}
  18. <li class="ui grid">
  19. <div class="ui four wide column meta">
  20. {{if .IsTag}}
  21. {{if .CreatedUnix}}<span class="time">{{TimeSinceUnix .CreatedUnix $.Lang}}</span>{{end}}
  22. {{else}}
  23. {{if .IsDraft}}
  24. <span class="ui yellow label">{{$.i18n.Tr "repo.release.draft"}}</span>
  25. {{else if .IsPrerelease}}
  26. <span class="ui orange label">{{$.i18n.Tr "repo.release.prerelease"}}</span>
  27. {{else}}
  28. <span class="ui green label">{{$.i18n.Tr "repo.release.stable"}}</span>
  29. {{end}}
  30. <span class="tag text blue">
  31. <a href="{{$.RepoLink}}/src/tag/{{.TagName | EscapePound}}" rel="nofollow"><i class="tag icon"></i> {{.TagName}}</a>
  32. </span>
  33. <span class="commit">
  34. <a href="{{$.RepoLink}}/src/commit/{{.Sha1}}" rel="nofollow"><i class="code icon"></i> {{ShortSha .Sha1}}</a>
  35. </span>
  36. {{end}}
  37. </div>
  38. <div class="ui twelve wide column detail">
  39. {{if .IsTag}}
  40. <h4>
  41. <a href="{{$.RepoLink}}/src/tag/{{.TagName | EscapePound}}" rel="nofollow"><i class="tag icon"></i> {{.TagName}}</a>
  42. </h4>
  43. <div class="download">
  44. {{if $.Permission.CanRead $.UnitTypeCode}}
  45. <a href="{{$.RepoLink}}/src/commit/{{.Sha1}}" rel="nofollow"><i class="code icon"></i> {{ShortSha .Sha1}}</a>
  46. <a href="{{$.RepoLink}}/archive/{{.TagName | EscapePound}}.zip" rel="nofollow"><i class="octicon octicon-file-zip"></i> ZIP</a>
  47. <a href="{{$.RepoLink}}/archive/{{.TagName | EscapePound}}.tar.gz"><i class="octicon octicon-file-zip"></i> TAR.GZ</a>
  48. {{end}}
  49. </div>
  50. {{else}}
  51. <h3>
  52. <a href="{{$.RepoLink}}/src/tag/{{.TagName | EscapePound}}">{{.Title}}</a>
  53. {{if $.CanCreateRelease}}<small>(<a href="{{$.RepoLink}}/releases/edit/{{.TagName | EscapePound}}" rel="nofollow">{{$.i18n.Tr "repo.release.edit"}}</a>)</small>{{end}}
  54. </h3>
  55. <p class="text grey">
  56. <span class="author">
  57. {{if .OriginalAuthor}}
  58. <i class="fa fa-github" aria-hidden="true"></i>
  59. {{.OriginalAuthor}}
  60. {{else if .Publisher}}
  61. <img class="img-10" src="{{.Publisher.RelAvatarLink}}">
  62. <a href="{{AppSubUrl}}/{{.Publisher.Name}}">{{.Publisher.Name}}</a>
  63. {{else}}
  64. Ghost
  65. {{end}}
  66. </span>
  67. {{if .CreatedUnix}}<span class="time">{{TimeSinceUnix .CreatedUnix $.Lang}}</span>{{end}}
  68. <span class="ahead">{{$.i18n.Tr "repo.release.ahead" .NumCommitsBehind .Target | Str2html}}</span>
  69. </p>
  70. <div class="markdown desc">
  71. {{Str2html .Note}}
  72. </div>
  73. <div class="download">
  74. <h2>{{$.i18n.Tr "repo.release.downloads"}}</h2>
  75. <ul class="list">
  76. {{if $.Permission.CanRead $.UnitTypeCode}}
  77. <li>
  78. <a href="{{$.RepoLink}}/archive/{{.TagName | EscapePound}}.zip" rel="nofollow"><strong><i class="octicon octicon-file-zip"></i> {{$.i18n.Tr "repo.release.source_code"}} (ZIP)</strong></a>
  79. </li>
  80. <li>
  81. <a href="{{$.RepoLink}}/archive/{{.TagName | EscapePound}}.tar.gz"><strong><i class="octicon octicon-file-zip"></i> {{$.i18n.Tr "repo.release.source_code"}} (TAR.GZ)</strong></a>
  82. </li>
  83. {{end}}
  84. {{if .Attachments}}
  85. {{range $attachment := .Attachments}}
  86. <li>
  87. <a target="_blank" rel="noopener noreferrer" href="{{$.RepoLink}}/releases/download/{{$release.TagName | PathEscape}}/{{$attachment.Name | PathEscape}}">
  88. <strong><span class="ui image octicon octicon-package" title='{{$attachment.Name}}'></span> {{$attachment.Name}}</strong>
  89. <span class="ui text grey right">{{$attachment.Size | FileSize}}</span>
  90. </a>
  91. </li>
  92. {{end}}
  93. {{end}}
  94. </ul>
  95. </div>
  96. {{end}}
  97. <span class="dot">&nbsp;</span>
  98. </div>
  99. </li>
  100. {{end}}
  101. </ul>
  102. {{template "base/paginate" .}}
  103. </div>
  104. </div>
  105. {{template "base/footer" .}}
上海开阖软件有限公司 沪ICP备12045867号-1