diff options
Diffstat (limited to 'routers/web/repo/repo.go')
-rw-r--r-- | routers/web/repo/repo.go | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/routers/web/repo/repo.go b/routers/web/repo/repo.go index 8b03133611..989c1a565e 100644 --- a/routers/web/repo/repo.go +++ b/routers/web/repo/repo.go @@ -22,6 +22,7 @@ import ( "code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/graceful" "code.gitea.io/gitea/modules/log" + repo_module "code.gitea.io/gitea/modules/repository" "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/storage" "code.gitea.io/gitea/modules/web" @@ -129,10 +130,10 @@ func Create(ctx *context.Context) { ctx.Data["Title"] = ctx.Tr("new_repo") // Give default value for template to render. - ctx.Data["Gitignores"] = models.Gitignores - ctx.Data["LabelTemplates"] = models.LabelTemplates - ctx.Data["Licenses"] = models.Licenses - ctx.Data["Readmes"] = models.Readmes + ctx.Data["Gitignores"] = repo_module.Gitignores + ctx.Data["LabelTemplates"] = repo_module.LabelTemplates + ctx.Data["Licenses"] = repo_module.Licenses + ctx.Data["Readmes"] = repo_module.Readmes ctx.Data["readme"] = "Default" ctx.Data["private"] = getRepoPrivate(ctx) ctx.Data["IsForcedPrivate"] = setting.Repository.ForcePrivate @@ -197,10 +198,10 @@ func CreatePost(ctx *context.Context) { form := web.GetForm(ctx).(*forms.CreateRepoForm) ctx.Data["Title"] = ctx.Tr("new_repo") - ctx.Data["Gitignores"] = models.Gitignores - ctx.Data["LabelTemplates"] = models.LabelTemplates - ctx.Data["Licenses"] = models.Licenses - ctx.Data["Readmes"] = models.Readmes + ctx.Data["Gitignores"] = repo_module.Gitignores + ctx.Data["LabelTemplates"] = repo_module.LabelTemplates + ctx.Data["Licenses"] = repo_module.Licenses + ctx.Data["Readmes"] = repo_module.Readmes ctx.Data["CanCreateRepo"] = ctx.Doer.CanCreateRepo() ctx.Data["MaxCreationLimit"] = ctx.Doer.MaxCreationLimit() |