diff options
Diffstat (limited to 'routers/repo/release.go')
-rw-r--r-- | routers/repo/release.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/routers/repo/release.go b/routers/repo/release.go index 8cd46e850d..ab251ec755 100644 --- a/routers/repo/release.go +++ b/routers/repo/release.go @@ -16,6 +16,7 @@ import ( "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/markup/markdown" "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/modules/upload" releaseservice "code.gitea.io/gitea/services/release" ) @@ -192,7 +193,8 @@ func NewRelease(ctx *context.Context) { ctx.Data["Title"] = ctx.Tr("repo.release.new_release") ctx.Data["PageIsReleaseList"] = true ctx.Data["tag_target"] = ctx.Repo.Repository.DefaultBranch - renderAttachmentSettings(ctx) + ctx.Data["IsAttachmentEnabled"] = setting.Attachment.Enabled + upload.AddUploadContext(ctx, "release") ctx.HTML(200, tplReleaseNew) } @@ -278,7 +280,8 @@ func EditRelease(ctx *context.Context) { ctx.Data["Title"] = ctx.Tr("repo.release.edit_release") ctx.Data["PageIsReleaseList"] = true ctx.Data["PageIsEditRelease"] = true - renderAttachmentSettings(ctx) + ctx.Data["IsAttachmentEnabled"] = setting.Attachment.Enabled + upload.AddUploadContext(ctx, "release") tagName := ctx.Params("*") rel, err := models.GetRelease(ctx.Repo.Repository.ID, tagName) |