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