You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

release_tag_header.tmpl 1.3KB

123456789101112131415161718192021222324252627
  1. {{$canReadReleases := $.Permission.CanRead $.UnitTypeReleases}}
  2. {{$canReadCode := $.Permission.CanRead $.UnitTypeCode}}
  3. {{if $canReadReleases}}
  4. <div class="gt-df">
  5. <div class="gt-f1 gt-df gt-ac">
  6. <h2 class="ui compact small menu header small-menu-items">
  7. <a class="{{if .PageIsReleaseList}}active {{end}}item" href="{{.RepoLink}}/releases">{{ctx.Locale.PrettyNumber .NumReleases}} {{ctx.Locale.TrN .NumReleases "repo.release" "repo.releases"}}</a>
  8. {{if $canReadCode}}
  9. <a class="{{if .PageIsTagList}}active {{end}}item" href="{{.RepoLink}}/tags">{{ctx.Locale.PrettyNumber .NumTags}} {{ctx.Locale.TrN .NumTags "repo.tag" "repo.tags"}}</a>
  10. {{end}}
  11. </h2>
  12. {{if .EnableFeed}}
  13. <a class="rss-icon gt-mx-3" href="{{.RepoLink}}/{{if .PageIsTagList}}tags{{else}}releases{{end}}.rss" data-tooltip-content="{{ctx.Locale.Tr "rss_feed"}}">{{svg "octicon-rss" 18}}</a>
  14. {{end}}
  15. </div>
  16. {{if and (not .PageIsTagList) .CanCreateRelease}}
  17. <a class="ui small primary button" href="{{$.RepoLink}}/releases/new">
  18. {{ctx.Locale.Tr "repo.release.new_release"}}
  19. </a>
  20. {{end}}
  21. </div>
  22. <div class="divider"></div>
  23. {{else if $canReadCode}}
  24. {{/* if the "repo.releases" unit is disabled, only show the "commits / branches / tags" sub menu */}}
  25. {{template "repo/sub_menu" .}}
  26. {{end}}