{{template "base/alert" .}}
{{template "repo/release_tag_header" .}}
{{$canReadReleases := $.Permission.CanRead $.UnitTypeReleases}}
{{range $idx, $release := .Releases}}
{{template "base/paginate" .}}
{{svg "octicon-tag" 16 "gt-mr-2"}}{{ctx.Locale.Tr "repo.release.tags"}}
{{$canReadReleases := $.Permission.CanRead $.UnitTypeReleases}}
{{if $canReadReleases}} {{.TagName}} {{else}} {{.TagName}} {{end}}
{{if $.Permission.CanRead $.UnitTypeCode}}
{{if .CreatedUnix}}
{{svg "octicon-clock" 16 "gt-mr-2"}}{{TimeSinceUnix .CreatedUnix ctx.Locale}}
{{end}}
{{svg "octicon-git-commit" 16 "gt-mr-2"}}{{ShortSha .Sha1}}
{{if not $.DisableDownloadSourceArchives}}
{{svg "octicon-file-zip" 16 "gt-mr-2"}}ZIP
{{svg "octicon-file-zip" 16 "gt-mr-2"}}TAR.GZ
{{end}}
{{if (and $canReadReleases $.CanCreateRelease $release.IsTag)}}
{{svg "octicon-tag" 16 "gt-mr-2"}}{{ctx.Locale.Tr "repo.release.new_release"}}
{{end}}
{{if (and ($.Permission.CanWrite $.UnitTypeCode) $release.IsTag)}}
{{svg "octicon-trash" 16 "gt-mr-2"}}{{ctx.Locale.Tr "repo.release.delete_tag"}}
{{end}}
{{if and $canReadReleases (not $release.IsTag)}}
{{svg "octicon-tag" 16 "gt-mr-2"}}{{ctx.Locale.Tr "repo.release.detail"}}
{{end}}
{{end}}
|