|
|
|
@ -210,6 +210,8 @@ func LatestRelease(ctx *context.Context) {
|
|
|
|
|
func NewRelease(ctx *context.Context) {
|
|
|
|
|
ctx.Data["Title"] = ctx.Tr("repo.release.new_release")
|
|
|
|
|
ctx.Data["PageIsReleaseList"] = true
|
|
|
|
|
ctx.Data["RequireSimpleMDE"] = true
|
|
|
|
|
ctx.Data["RequireTribute"] = true
|
|
|
|
|
ctx.Data["tag_target"] = ctx.Repo.Repository.DefaultBranch
|
|
|
|
|
if tagName := ctx.Query("tag"); len(tagName) > 0 {
|
|
|
|
|
rel, err := models.GetRelease(ctx.Repo.Repository.ID, tagName)
|
|
|
|
@ -235,6 +237,8 @@ func NewReleasePost(ctx *context.Context) {
|
|
|
|
|
form := web.GetForm(ctx).(*auth.NewReleaseForm)
|
|
|
|
|
ctx.Data["Title"] = ctx.Tr("repo.release.new_release")
|
|
|
|
|
ctx.Data["PageIsReleaseList"] = true
|
|
|
|
|
ctx.Data["RequireSimpleMDE"] = true
|
|
|
|
|
ctx.Data["RequireTribute"] = true
|
|
|
|
|
|
|
|
|
|
if ctx.HasError() {
|
|
|
|
|
ctx.HTML(200, tplReleaseNew)
|
|
|
|
@ -313,6 +317,8 @@ func EditRelease(ctx *context.Context) {
|
|
|
|
|
ctx.Data["Title"] = ctx.Tr("repo.release.edit_release")
|
|
|
|
|
ctx.Data["PageIsReleaseList"] = true
|
|
|
|
|
ctx.Data["PageIsEditRelease"] = true
|
|
|
|
|
ctx.Data["RequireSimpleMDE"] = true
|
|
|
|
|
ctx.Data["RequireTribute"] = true
|
|
|
|
|
ctx.Data["IsAttachmentEnabled"] = setting.Attachment.Enabled
|
|
|
|
|
upload.AddUploadContext(ctx, "release")
|
|
|
|
|
|
|
|
|
@ -343,6 +349,8 @@ func EditReleasePost(ctx *context.Context) {
|
|
|
|
|
ctx.Data["Title"] = ctx.Tr("repo.release.edit_release")
|
|
|
|
|
ctx.Data["PageIsReleaseList"] = true
|
|
|
|
|
ctx.Data["PageIsEditRelease"] = true
|
|
|
|
|
ctx.Data["RequireSimpleMDE"] = true
|
|
|
|
|
ctx.Data["RequireTribute"] = true
|
|
|
|
|
|
|
|
|
|
tagName := ctx.Params("*")
|
|
|
|
|
rel, err := models.GetRelease(ctx.Repo.Repository.ID, tagName)
|
|
|
|
|