list.tmpl 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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 and .IsRepositoryWriter (not .Repository.IsMirror)}}
  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 basic label">{{$.i18n.Tr "repo.release.draft"}}</span>
  23. {{else if .IsPrerelease}}
  24. <span class="ui orange basic label">{{$.i18n.Tr "repo.release.prerelease"}}</span>
  25. {{end}}
  26. <span class="tag text blue">
  27. <a href="{{$.RepoLink}}/src/{{.TagName}}" rel="nofollow"><i class="tag icon"></i> {{.TagName}}</a>
  28. </span>
  29. {{end}}
  30. <span class="commit">
  31. <a href="{{$.RepoLink}}/src/{{.Sha1}}" rel="nofollow"><i class="code icon"></i> {{ShortSha .Sha1}}</a>
  32. </span>
  33. </div>
  34. <div class="ui twelve wide column detail">
  35. {{if .PublisherID}}
  36. <h3>
  37. <a href="{{$.RepoLink}}/src/{{.TagName}}">{{.Title}}</a>
  38. {{if $.IsRepositoryWriter}}<small>(<a href="{{$.RepoLink}}/releases/edit/{{.TagName}}" rel="nofollow">{{$.i18n.Tr "repo.release.edit"}}</a>)</small>{{end}}
  39. </h3>
  40. <p class="text grey">
  41. <span class="author">
  42. <img class="img-10" src="{{.Publisher.RelAvatarLink}}">
  43. <a href="{{AppSubUrl}}/{{.Publisher.Name}}">{{.Publisher.DisplayName}}</a>
  44. </span>
  45. {{if .Created}}<span class="time">{{TimeSince .Created $.Lang}}</span>{{end}}
  46. <span class="ahead">{{$.i18n.Tr "repo.release.ahead" .NumCommitsBehind .Target | Str2html}}</span>
  47. </p>
  48. <div class="markdown desc">
  49. {{Str2html .Note}}
  50. </div>
  51. <div class="download">
  52. <h2>{{$.i18n.Tr "repo.release.downloads"}}</h2>
  53. <ul class="list">
  54. <li>
  55. <a href="{{$.RepoLink}}/archive/{{.TagName}}.zip" rel="nofollow"><i class="octicon octicon-file-zip"></i> {{$.i18n.Tr "repo.release.source_code"}} (ZIP)</a>
  56. </li>
  57. <li>
  58. <a href="{{$.RepoLink}}/archive/{{.TagName}}.tar.gz"><i class="octicon octicon-file-zip"></i> {{$.i18n.Tr "repo.release.source_code"}} (TAR.GZ)</a>
  59. </li>
  60. </ul>
  61. </div>
  62. {{else}}
  63. <h4>
  64. <a href="{{$.RepoLink}}/src/{{.TagName}}" rel="nofollow"><i class="tag icon"></i> {{.TagName}}</a>
  65. </h4>
  66. <div class="download">
  67. <a href="{{$.RepoLink}}/archive/{{.TagName}}.zip" rel="nofollow"><i class="octicon octicon-file-zip"></i>ZIP</a>
  68. <a href="{{$.RepoLink}}/archive/{{.TagName}}.tar.gz"><i class="octicon octicon-file-zip"></i>TAR.GZ</a>
  69. </div>
  70. {{end}}
  71. <span class="dot">&nbsp;</span>
  72. </div>
  73. </li>
  74. {{end}}
  75. </ul>
  76. <div class="center">
  77. <a class="ui small button {{if not .HasPrevious}}disabled{{end}}" {{if .HasPrevious}}href="{{$.Link}}?after={{.PreviousAfter}}"{{end}}>
  78. {{$.i18n.Tr "repo.issues.previous"}}
  79. </a>
  80. <a class="ui small button {{if .ReachEnd}}disabled{{end}}" {{if not .ReachEnd}}href="{{$.Link}}?after={{.NextAfter}}"{{end}}>
  81. {{$.i18n.Tr "repo.issues.next"}}
  82. </a>
  83. </div>
  84. </div>
  85. </div>
  86. {{template "base/footer" .}}