{{$canReadReleases := $.Permission.CanRead $.UnitTypeReleases}} {{$canReadCode := $.Permission.CanRead $.UnitTypeCode}} {{if $canReadReleases}}
{{if .EnableFeed}} {{svg "octicon-rss" 16}} {{ctx.Locale.Tr "rss_feed"}} {{end}} {{if and (not .PageIsTagList) .CanCreateRelease}} {{ctx.Locale.Tr "repo.release.new_release"}} {{end}}
{{else if $canReadCode}} {{/* if the "repo.releases" unit is disabled, only show the "commits / branches / tags" sub menu */}} {{template "repo/sub_menu" .}} {{end}}