diff options
author | Unknwon <u@gogs.io> | 2015-08-28 16:44:04 +0800 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2015-08-28 16:44:04 +0800 |
commit | 46bee50e45ef8f3e9f3727649fa24d50bb2fc782 (patch) | |
tree | 3b55f109f957c54890972d533af435d3a3ed8e96 /routers/repo/repo.go | |
parent | 4cfa2ca40d4f211a124ab9973dfc814190b758b9 (diff) | |
download | gitea-46bee50e45ef8f3e9f3727649fa24d50bb2fc782.tar.gz gitea-46bee50e45ef8f3e9f3727649fa24d50bb2fc782.zip |
complate list of gitignores and licenses
Diffstat (limited to 'routers/repo/repo.go')
-rw-r--r-- | routers/repo/repo.go | 7 |
1 files changed, 4 insertions, 3 deletions
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) |