list.tmpl 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  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. {{range .Attachments}}
  55. <li>
  56. <i class="octicon octicon-package"></i> <a href="{{AppSubUrl}}/attachments/{{.UUID}}" rel="nofollow">{{.Name}}</a>
  57. </li>
  58. {{end}}
  59. {{if not .IsDraft}}
  60. <li>
  61. <i class="octicon octicon-file-zip"></i> <a href="{{$.RepoLink}}/archive/{{.TagName}}.zip" rel="nofollow">{{$.i18n.Tr "repo.release.source_code"}} (ZIP)</a>
  62. </li>
  63. <li>
  64. <i class="octicon octicon-file-zip"></i> <a href="{{$.RepoLink}}/archive/{{.TagName}}.tar.gz">{{$.i18n.Tr "repo.release.source_code"}} (TAR.GZ)</a>
  65. </li>
  66. {{end}}
  67. </ul>
  68. </div>
  69. {{else}}
  70. <h4>
  71. <a href="{{$.RepoLink}}/src/{{.TagName}}" rel="nofollow"><i class="tag icon"></i> {{.TagName}}</a>
  72. </h4>
  73. <div class="download">
  74. <a href="{{$.RepoLink}}/archive/{{.TagName}}.zip" rel="nofollow"><i class="octicon octicon-file-zip"></i>ZIP</a>
  75. <a href="{{$.RepoLink}}/archive/{{.TagName}}.tar.gz"><i class="octicon octicon-file-zip"></i>TAR.GZ</a>
  76. </div>
  77. {{end}}
  78. <span class="dot">&nbsp;</span>
  79. </div>
  80. </li>
  81. {{end}}
  82. </ul>
  83. <div class="center">
  84. <a class="ui small button {{if not .HasPrevious}}disabled{{end}}" {{if .HasPrevious}}href="{{$.Link}}?after={{.PreviousAfter}}"{{end}}>
  85. {{$.i18n.Tr "repo.issues.previous"}}
  86. </a>
  87. <a class="ui small button {{if .ReachEnd}}disabled{{end}}" {{if not .ReachEnd}}href="{{$.Link}}?after={{.NextAfter}}"{{end}}>
  88. {{$.i18n.Tr "repo.issues.next"}}
  89. </a>
  90. </div>
  91. </div>
  92. </div>
  93. {{template "base/footer" .}}