{{if .Permission.CanRead $.UnitTypeReleases}} {{.locale.Tr "repo.release.releases"}} {{end}} {{if .Permission.CanRead $.UnitTypeCode}} {{.locale.Tr "repo.release.tags"}} {{end}}
{{if .EnableFeed}} {{svg "octicon-rss" 18}} {{end}} {{if (and .CanCreateRelease (not .PageIsTagList))}} {{.locale.Tr "repo.release.new_release"}} {{end}} {{if .PageIsTagList}} {{if gt .ReleasesNum 0}}
{{svg "octicon-tag" 16 "mr-2"}}{{.locale.Tr "repo.release.tags"}}
{{.TagName}}
{{if $.Permission.CanRead $.UnitTypeCode}}
{{svg "octicon-git-commit" 16 "mr-2"}}{{ShortSha .Sha1}}
{{if not $.DisableDownloadSourceArchives}}
{{svg "octicon-file-zip" 16 "mr-2"}}ZIP
{{svg "octicon-file-zip" 16 "mr-2"}}TAR.GZ
{{end}}
{{if (and $.CanCreateRelease $release.IsTag)}}
{{svg "octicon-tag" 16 "mr-2"}}{{$.locale.Tr "repo.release.new_release"}}
{{end}}
{{if (and ($.Permission.CanWrite $.UnitTypeCode) $release.IsTag)}}
{{svg "octicon-trash" 16 "mr-2"}}{{$.locale.Tr "repo.release.delete_tag"}}
{{end}}
{{if (not $release.IsTag)}}
{{svg "octicon-tag" 16 "mr-2"}}{{$.locale.Tr "repo.release.detail"}}
{{end}}
{{end}}
|
-
{{range $idx, $release := .Releases}}
-
{{if .IsTag}}
{{if gt .Publisher.ID 0}} {{$.locale.Tr "repo.released_this"}} {{if .CreatedUnix}} {{TimeSinceUnix .CreatedUnix $.locale}} {{end}} | {{end}} {{$.locale.Tr "repo.release.ahead.commits" .NumCommitsBehind | Str2html}} {{$.locale.Tr "repo.release.ahead.target" $.DefaultBranch}}
{{if $.Permission.CanRead $.UnitTypeCode}} {{svg "octicon-git-commit" 16 "mr-2"}}{{ShortSha .Sha1}} {{if not $.DisableDownloadSourceArchives}} {{svg "octicon-file-zip"}} ZIP {{svg "octicon-file-zip"}} TAR.GZ {{end}} {{end}}{{else}}{{.Title}} {{if .IsDraft}} {{$.locale.Tr "repo.release.draft"}} {{else if .IsPrerelease}} {{$.locale.Tr "repo.release.prerelease"}} {{else if not .IsTag}} {{$.locale.Tr "repo.release.stable"}} {{end}}
{{if $.CanCreateRelease}} {{svg "octicon-pencil"}} {{end}}{{$.locale.Tr "repo.released_this"}} {{if .CreatedUnix}} {{TimeSinceUnix .CreatedUnix $.locale}} {{end}} {{if not .IsDraft}} | {{$.locale.Tr "repo.release.ahead.commits" .NumCommitsBehind | Str2html}} {{$.locale.Tr "repo.release.ahead.target" .Target}} {{end}}
{{Str2html .Note}}{{$.locale.Tr "repo.release.downloads"}}
-
{{if and (not $.DisableDownloadSourceArchives) (not .IsDraft) ($.Permission.CanRead $.UnitTypeCode)}}
- {{svg "octicon-file-zip" 16 "mr-2"}}{{$.locale.Tr "repo.release.source_code"}} (ZIP)
- {{svg "octicon-file-zip" 16 "mr-2"}}{{$.locale.Tr "repo.release.source_code"}} (TAR.GZ) {{end}} {{if .Attachments}} {{range .Attachments}}
- {{.Size | FileSize}} {{svg "octicon-info"}} {{svg "octicon-package" 16 "mr-2"}}{{.Name}} {{end}} {{end}}
{{end}}