From 46bee50e45ef8f3e9f3727649fa24d50bb2fc782 Mon Sep 17 00:00:00 2001 From: Unknwon Date: Fri, 28 Aug 2015 16:44:04 +0800 Subject: complate list of gitignores and licenses --- routers/repo/repo.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'routers/repo/repo.go') diff --git a/routers/repo/repo.go b/routers/repo/repo.go index 1d29557005..22aa9cd5f1 100644 --- a/routers/repo/repo.go +++ b/routers/repo/repo.go @@ -52,10 +52,10 @@ func Create(ctx *middleware.Context) { ctx.Data["Title"] = ctx.Tr("new_repo") // Give default value for template to render. - ctx.Data["gitignore"] = "0" - ctx.Data["license"] = "0" ctx.Data["Gitignores"] = models.Gitignores ctx.Data["Licenses"] = models.Licenses + ctx.Data["Readmes"] = models.Readmes + ctx.Data["readme"] = "Default" ctxUser := checkContextUser(ctx, ctx.QueryInt64("org")) if ctx.Written() { @@ -77,6 +77,7 @@ func CreatePost(ctx *middleware.Context, form auth.CreateRepoForm) { ctx.Data["Gitignores"] = models.Gitignores ctx.Data["Licenses"] = models.Licenses + ctx.Data["Readmes"] = models.Readmes ctxUser := checkContextUser(ctx, form.Uid) if ctx.Written() { @@ -104,7 +105,7 @@ func CreatePost(ctx *middleware.Context, form auth.CreateRepoForm) { } repo, err := models.CreateRepository(ctxUser, form.RepoName, form.Description, - form.Gitignore, form.License, form.Private, false, form.AutoInit) + form.Gitignores, form.License, form.Private, false, form.AutoInit) if err == nil { log.Trace("Repository created: %s/%s", ctxUser.Name, repo.Name) ctx.Redirect(setting.AppSubUrl + "/" + ctxUser.Name + "/" + repo.Name) -- cgit v1.2.3