|
|
|
@ -181,7 +181,7 @@ func ChangeProjectStatus(ctx *context.Context) { |
|
|
|
|
ctx.NotFoundOrServerError("ChangeProjectStatusByRepoIDAndID", project_model.IsErrProjectNotExist, err) |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
ctx.JSONRedirect(fmt.Sprintf("%s/projects/%d", ctx.Repo.RepoLink, id)) |
|
|
|
|
ctx.JSONRedirect(project_model.ProjectLinkForRepo(ctx.Repo.Repository, id)) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// DeleteProject delete a project
|
|
|
|
@ -235,7 +235,7 @@ func RenderEditProject(ctx *context.Context) { |
|
|
|
|
ctx.Data["content"] = p.Description |
|
|
|
|
ctx.Data["card_type"] = p.CardType |
|
|
|
|
ctx.Data["redirect"] = ctx.FormString("redirect") |
|
|
|
|
ctx.Data["CancelLink"] = fmt.Sprintf("%s/projects/%d", ctx.Repo.Repository.Link(), p.ID) |
|
|
|
|
ctx.Data["CancelLink"] = project_model.ProjectLinkForRepo(ctx.Repo.Repository, p.ID) |
|
|
|
|
|
|
|
|
|
ctx.HTML(http.StatusOK, tplProjectsNew) |
|
|
|
|
} |
|
|
|
@ -249,7 +249,7 @@ func EditProjectPost(ctx *context.Context) { |
|
|
|
|
ctx.Data["PageIsEditProjects"] = true |
|
|
|
|
ctx.Data["CanWriteProjects"] = ctx.Repo.Permission.CanWrite(unit.TypeProjects) |
|
|
|
|
ctx.Data["CardTypes"] = project_model.GetCardConfig() |
|
|
|
|
ctx.Data["CancelLink"] = fmt.Sprintf("%s/projects/%d", ctx.Repo.Repository.Link(), projectID) |
|
|
|
|
ctx.Data["CancelLink"] = project_model.ProjectLinkForRepo(ctx.Repo.Repository, projectID) |
|
|
|
|
|
|
|
|
|
if ctx.HasError() { |
|
|
|
|
ctx.HTML(http.StatusOK, tplProjectsNew) |
|
|
|
|