{{template "base/alert" .}}
{{range $idx, $release := .Releases}}
{{end}}
{{else}}
{{if .Permission.CanRead $.UnitTypeReleases}} {{.i18n.Tr "repo.release.releases"}} {{end}} {{if .Permission.CanRead $.UnitTypeCode}} {{.i18n.Tr "repo.release.tags"}} {{end}}
{{if (and .CanCreateRelease (not .PageIsTagList))}} {{.i18n.Tr "repo.release.new_release"}} {{end}} {{if .PageIsTagList}} {{if gt .ReleasesNum 0}}
{{svg "octicon-tag" 16 "mr-2"}}{{.i18n.Tr "repo.release.tags"}}
{{.TagName}}
{{if $.Permission.CanRead $.UnitTypeCode}}
{{svg "octicon-git-commit" 16 "mr-2"}}{{ShortSha .Sha1}}
{{svg "octicon-file-zip" 16 "mr-2"}}ZIP
{{svg "octicon-file-zip" 16 "mr-2"}}TAR.GZ
{{if (and $.CanCreateRelease $release.IsTag)}}
{{svg "octicon-tag" 16 "mr-2"}}{{$.i18n.Tr "repo.release.new_release"}}
{{end}}
{{if (and ($.Permission.CanWrite $.UnitTypeCode) $release.IsTag)}}
{{svg "octicon-trashcan" 16 "mr-2"}}{{$.i18n.Tr "repo.release.delete_tag"}}
{{end}}
{{if (not $release.IsTag)}}
{{svg "octicon-tag" 16 "mr-2"}}{{$.i18n.Tr "repo.release.detail"}}
{{end}}
{{end}}
|
-
{{range $idx, $release := .Releases}}
-
{{if .IsTag}}
{{svg "octicon-tag" 16 "mr-2"}}{{.TagName}}
{{ if gt .Publisher.ID 0 }} {{$.i18n.Tr "repo.release.ahead.commits" .NumCommitsBehind | Str2html}} {{$.i18n.Tr "repo.release.ahead.target" $.DefaultBranch}}
{{ end }}{{if $.Permission.CanRead $.UnitTypeCode}} {{svg "octicon-git-commit" 16 "mr-2"}}{{ShortSha .Sha1}} {{svg "octicon-file-zip"}} ZIP {{svg "octicon-file-zip"}} TAR.GZ {{end}}{{else}}{{.Title}} {{if $.CanCreateRelease}} ({{$.i18n.Tr "repo.release.edit"}}) {{end}}
{{$.i18n.Tr "repo.released_this"}} {{if .CreatedUnix}} {{TimeSinceUnix .CreatedUnix $.Lang}} {{end}} {{if not .IsDraft}} | {{$.i18n.Tr "repo.release.ahead.commits" .NumCommitsBehind | Str2html}} {{$.i18n.Tr "repo.release.ahead.target" .Target}} {{end}}
{{Str2html .Note}}{{svg "octicon-triangle-right" 14 "dropdown icon"}} {{$.i18n.Tr "repo.release.downloads"}}
-
{{if and (not .IsDraft) ($.Permission.CanRead $.UnitTypeCode)}}
- {{svg "octicon-file-zip" 16 "mr-2"}}{{$.i18n.Tr "repo.release.source_code"}} (ZIP)
- {{svg "octicon-file-zip" 16 "mr-2"}}{{$.i18n.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}}