diff --git a/routers/repo/release.go b/routers/repo/release.go index 3c496638302..187952c2e64 100644 --- a/routers/repo/release.go +++ b/routers/repo/release.go @@ -247,6 +247,7 @@ func EditRelease(ctx *context.Context) { ctx.Data["title"] = rel.Title ctx.Data["content"] = rel.Note ctx.Data["prerelease"] = rel.IsPrerelease + ctx.Data["IsDraft"] = rel.IsDraft ctx.HTML(200, RELEASE_NEW) } diff --git a/templates/repo/release/new.tmpl b/templates/repo/release/new.tmpl index 9f947fa26ac..3a9e6fadd8b 100644 --- a/templates/repo/release/new.tmpl +++ b/templates/repo/release/new.tmpl @@ -64,9 +64,16 @@ {{.i18n.Tr "repo.release.cancel"}} - + {{if .IsDraft}} + + + {{else}} + + {{end}} {{$.i18n.Tr "repo.release.delete_release"}}