|
|
@ -328,6 +328,14 @@ func NewRelease(ctx *context.Context) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
ctx.Data["IsAttachmentEnabled"] = setting.Attachment.Enabled
|
|
|
|
ctx.Data["IsAttachmentEnabled"] = setting.Attachment.Enabled
|
|
|
|
|
|
|
|
var err error
|
|
|
|
|
|
|
|
// Get assignees.
|
|
|
|
|
|
|
|
ctx.Data["Assignees"], err = repo_model.GetRepoAssignees(ctx, ctx.Repo.Repository)
|
|
|
|
|
|
|
|
if err != nil {
|
|
|
|
|
|
|
|
ctx.ServerError("GetAssignees", err)
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
upload.AddUploadContext(ctx, "release")
|
|
|
|
upload.AddUploadContext(ctx, "release")
|
|
|
|
ctx.HTML(http.StatusOK, tplReleaseNew)
|
|
|
|
ctx.HTML(http.StatusOK, tplReleaseNew)
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -484,6 +492,13 @@ func EditRelease(ctx *context.Context) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
ctx.Data["attachments"] = rel.Attachments
|
|
|
|
ctx.Data["attachments"] = rel.Attachments
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Get assignees.
|
|
|
|
|
|
|
|
ctx.Data["Assignees"], err = repo_model.GetRepoAssignees(ctx, rel.Repo)
|
|
|
|
|
|
|
|
if err != nil {
|
|
|
|
|
|
|
|
ctx.ServerError("GetAssignees", err)
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
ctx.HTML(http.StatusOK, tplReleaseNew)
|
|
|
|
ctx.HTML(http.StatusOK, tplReleaseNew)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|