list.tmpl 4.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. {{template "ng/base/head" .}}
  2. {{template "ng/base/header" .}}
  3. <div id="repo-wrapper">
  4. {{template "repo/header_old" .}}
  5. <div id="repo-content" class="clear container">
  6. <div id="repo-main" class="left grid-5-6">
  7. <div id="release">
  8. <h4 id="release-head">
  9. <span class="release"><strong>{{.i18n.Tr "repo.release.releases"}}</strong></span><!-- /
  10. <a class="tag" href="{{AppSubUrl}}/{tag_link}">Tags</a> -->
  11. <!-- comment : if in tag page, show a.release and span.tag please -->
  12. {{if .IsRepositoryAdmin}}
  13. <a class="btn" href="{{$.RepoLink}}/releases/new">
  14. <button class="btn btn-medium btn-blue btn-radius">
  15. {{.i18n.Tr "repo.release.new_release"}}
  16. </button>
  17. </a>
  18. {{end}}
  19. </h4>
  20. <ul id="release-list" class="list-unstyled">
  21. {{range .Releases}}
  22. <li class="release-item clearfix" id="release-{{.Sha1}}">
  23. {{if .PublisherId}}
  24. <div class="grid-1-6 text-right release-meta">
  25. {{if .IsDraft}}
  26. <span class="label label-blue label-radius">{{$.i18n.Tr "repo.release.draft"}}</span>
  27. {{else if .IsPrerelease}}
  28. <span class="label label-orange label-radius">{{$.i18n.Tr "repo.release.prerelease"}}</span>
  29. {{else}}
  30. <span class="label label-green label-radius">{{$.i18n.Tr "repo.release.stable"}}</span>
  31. {{end}}
  32. <a class="tag" href="{{$.RepoLink}}/src/{{.TagName}}" rel="nofollow"><i class="fa fa-tag"></i> {{.TagName}}</a>
  33. <a class="commit" href="{{$.RepoLink}}/src/{{.Sha1}}" rel="nofollow"><i class="fa fa-code"></i> {{ShortSha .Sha1}}</a>
  34. </div>
  35. <div class="grid-9-12 release-detail left">
  36. <h4 class="title"><a href="{{$.RepoLink}}/src/{{.TagName}}">{{.Title}}</a> <small>(<a href="{{$.RepoLink}}/releases/edit/{{.TagName}}" rel="nofollow">{{$.i18n.Tr "repo.release.edit"}}</a>)</small></h4>
  37. <p class="info">
  38. <span class="author"><img class="avatar-20" src="{{.Publisher.AvatarLink}}">&nbsp;&nbsp;
  39. <a href="{{AppSubUrl}}/{{.Publisher.Name}}">{{.Publisher.Name}}</a></span>
  40. {{if .Created}}<span class="time">{{TimeSince .Created $.Lang}}</span>{{end}}
  41. <span class="ahead">{{$.i18n.Tr "repo.release.ahead" .NumCommitsBehind .Target | Str2html}}</span>
  42. </p>
  43. <div class="markdown desc">
  44. {{Str2html .Note}}
  45. </div>
  46. <p class="download">
  47. <a class="btn btn-gray btn-large btn-radius" href="{{$.RepoLink}}/archive/{{.TagName}}.zip" rel="nofollow"><i class="fa fa-download"></i> {{$.i18n.Tr "repo.release.source_code"}} (ZIP)</a>
  48. <a class="btn btn-gray btn-large btn-radius" href="{{$.RepoLink}}/archive/{{.TagName}}.tar.gz"><i class="fa fa-download"></i> {{$.i18n.Tr "repo.release.source_code"}} (TAR.GZ)</a>
  49. </p>
  50. <span class="dot">&nbsp;</span>
  51. </div>
  52. {{else}}
  53. <div class="grid-1-6 text-right release-meta">
  54. <a class="commit" href="{{$.RepoLink}}/src/{{.Sha1}}" rel="nofollow"><i class="fa fa-code"></i> {{ShortSha .Sha1}}</a>
  55. </div>
  56. <div class="grid-9-12 release-detail left">
  57. <h5 class="title"><a href="{{$.RepoLink}}/src/{{.TagName}}" rel="nofollow">{{.TagName}}</a> <i class="fa fa-tag"></i></h5>
  58. <p class="download">
  59. <a class="download-link" href="{{$.RepoLink}}/archive/{{.TagName}}.zip" rel="nofollow"><i class="fa fa-download"></i> ZIP</a>
  60. <a class="download-link" href="{{$.RepoLink}}/archive/{{.TagName}}.tar.gz"><i class="fa fa-download"></i> TAR.GZ</a>
  61. </p>
  62. <span class="dot">&nbsp;</span>
  63. </div>
  64. {{end}}
  65. </li>
  66. {{end}}
  67. </ul>
  68. </div>
  69. </div>
  70. {{template "repo/sidebar" .}}
  71. </div>
  72. </div>
  73. {{template "ng/base/footer" .}}