{{template "repo/header" .}}

{{if .PageIsEditRelease}} {{ctx.Locale.Tr "repo.release.edit_release"}}
{{ctx.Locale.Tr "repo.release.edit_subheader"}}
{{else}} {{ctx.Locale.Tr "repo.release.new_release"}}
{{ctx.Locale.Tr "repo.release.new_subheader"}}
{{end}}

{{template "base/alert" .}}
{{.CsrfTokenHtml}}
{{if .PageIsEditRelease}} {{.tag_name}}@{{.tag_target}} {{else}}
@
{{ctx.Locale.Tr "repo.release.tag_helper"}}
{{end}}
{{template "shared/combomarkdowneditor" (dict "MarkdownPreviewUrl" (print .Repository.Link "/markup") "MarkdownPreviewContext" .RepoLink "TextareaName" "content" "TextareaContent" .content "TextareaPlaceholder" (ctx.Locale.Tr "repo.release.message") "TextareaAriaLabel" (ctx.Locale.Tr "repo.release.message") "DropzoneParentContainer" "form" "EasyMDE" true )}}
{{range .attachments}}
{{if .ExternalURL}} {{svg "octicon-link-external" 16 "tw-mr-2"}} {{else}} {{svg "octicon-package" 16 "tw-mr-2"}} {{end}}
{{if .ExternalURL}} {{else}} {{ctx.Locale.TrN .DownloadCount "repo.release.download_count_one" "repo.release.download_count_few" (ctx.Locale.PrettyNumber .DownloadCount)}} ยท {{.Size | ctx.Locale.TrSize}} {{end}}
{{ctx.Locale.Tr "remove"}}
{{end}}
{{svg "octicon-link-external" 16 "tw-mr-2"}}
{{ctx.Locale.Tr "remove"}}
{{ctx.Locale.Tr "repo.release.add_external_asset"}} {{if .IsAttachmentEnabled}}
{{template "repo/upload" .}}
{{end}}
{{if not .PageIsEditRelease}}
{{else}} {{end}}
{{ctx.Locale.Tr "repo.release.prerelease_helper"}} {{if not .DisableDownloadSourceArchives}}
{{ctx.Locale.Tr "repo.release.hide_archive_links_helper"}} {{end}}
{{if .PageIsEditRelease}} {{ctx.Locale.Tr "repo.release.cancel"}} {{ctx.Locale.Tr "repo.release.delete_release"}} {{if .IsDraft}} {{else}} {{end}} {{else}} {{if not .tag_name}} {{end}} {{end}}