Skip to content

Commit a5e6e22

Browse files
committed
Cleanup from merge with master.
1 parent a3b449a commit a5e6e22

File tree

1 file changed

+0
-46
lines changed

1 file changed

+0
-46
lines changed

routers/web/repo/projects.go

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -673,49 +673,3 @@ func MoveIssues(ctx *context.Context) {
673673
"ok": true,
674674
})
675675
}
676-
677-
// CreateProject renders the generic project creation page
678-
func CreateProject(ctx *context.Context) {
679-
ctx.Data["Title"] = ctx.Tr("repo.projects.new")
680-
ctx.Data["BoardTypes"] = project_model.GetBoardConfig()
681-
ctx.Data["CardTypes"] = project_model.GetCardConfig()
682-
ctx.Data["CanWriteProjects"] = ctx.Repo.Permission.CanWrite(unit.TypeProjects)
683-
684-
ctx.HTML(http.StatusOK, tplGenericProjectsNew)
685-
}
686-
687-
// CreateProjectPost creates an individual and/or organization project
688-
func CreateProjectPost(ctx *context.Context, form forms.UserCreateProjectForm) {
689-
user := checkContextUser(ctx, form.UID)
690-
if ctx.Written() {
691-
return
692-
}
693-
694-
ctx.Data["ContextUser"] = user
695-
696-
if ctx.HasError() {
697-
ctx.Data["CanWriteProjects"] = ctx.Repo.Permission.CanWrite(unit.TypeProjects)
698-
ctx.HTML(http.StatusOK, tplGenericProjectsNew)
699-
return
700-
}
701-
702-
projectType := project_model.TypeIndividual
703-
if user.IsOrganization() {
704-
projectType = project_model.TypeOrganization
705-
}
706-
707-
if err := project_model.NewProject(&project_model.Project{
708-
Title: form.Title,
709-
Description: form.Content,
710-
CreatorID: user.ID,
711-
BoardType: form.BoardType,
712-
CardType: form.CardType,
713-
Type: projectType,
714-
}); err != nil {
715-
ctx.ServerError("NewProject", err)
716-
return
717-
}
718-
719-
ctx.Flash.Success(ctx.Tr("repo.projects.create_success", form.Title))
720-
ctx.Redirect(setting.AppSubURL + "/")
721-
}

0 commit comments

Comments
 (0)