list.tmpl 3.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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. </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 class="center">
  79. <a class="ui small button {{if not .HasPrevious}}disabled{{end}}" {{if .HasPrevious}}href="{{$.Link}}?after={{.PreviousAfter}}"{{end}}>
  80. {{$.i18n.Tr "repo.issues.previous"}}
  81. </a>
  82. <a class="ui small button {{if .ReachEnd}}disabled{{end}}" {{if not .ReachEnd}}href="{{$.Link}}?after={{.NextAfter}}"{{end}}>
  83. {{$.i18n.Tr "repo.issues.next"}}
  84. </a>
  85. </div>
  86. </div>
  87. </div>
  88. {{template "base/footer" .}}