summaryrefslogtreecommitdiffstats
path: root/routers/repo/repo.go
diff options
context:
space:
mode:
authorslene <vslene@gmail.com>2014-03-19 22:21:03 +0800
committerslene <vslene@gmail.com>2014-03-19 22:21:03 +0800
commit199fdd03360e3c9d1d2fb93fe993e01d115e8312 (patch)
treedee773523e820ae92f3f77ad9b80f7d57d05e07f /routers/repo/repo.go
parent483cc3136920a70ae1707ec5337d574b288853c3 (diff)
downloadgitea-199fdd03360e3c9d1d2fb93fe993e01d115e8312.tar.gz
gitea-199fdd03360e3c9d1d2fb93fe993e01d115e8312.zip
fork render
Diffstat (limited to 'routers/repo/repo.go')
-rw-r--r--routers/repo/repo.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/routers/repo/repo.go b/routers/repo/repo.go
index 61bf47c1f5..947643a1a8 100644
--- a/routers/repo/repo.go
+++ b/routers/repo/repo.go
@@ -17,7 +17,7 @@ func Create(ctx *middleware.Context, form auth.CreateRepoForm) {
if ctx.Req.Method == "GET" {
ctx.Data["LanguageIgns"] = models.LanguageIgns
ctx.Data["Licenses"] = models.Licenses
- ctx.Render.HTML(200, "repo/create", ctx.Data)
+ ctx.HTML(200, "repo/create", ctx.Data)
return
}
@@ -25,7 +25,7 @@ func Create(ctx *middleware.Context, form auth.CreateRepoForm) {
form.Language, form.License, form.Visibility == "private", form.InitReadme == "on")
if err == nil {
log.Trace("%s Repository created: %s/%s", ctx.Req.RequestURI, ctx.User.LowerName, form.RepoName)
- ctx.Render.Redirect("/"+ctx.User.Name+"/"+form.RepoName, 302)
+ ctx.Redirect("/"+ctx.User.Name+"/"+form.RepoName, 302)
return
} else if err == models.ErrRepoAlreadyExist {
ctx.RenderWithErr("Repository name has already been used", "repo/create", &form)
@@ -36,7 +36,7 @@ func Create(ctx *middleware.Context, form auth.CreateRepoForm) {
func SettingPost(ctx *middleware.Context) {
if !ctx.Repo.IsOwner {
- ctx.Render.Error(404)
+ ctx.Error(404)
return
}
@@ -44,7 +44,7 @@ func SettingPost(ctx *middleware.Context) {
case "delete":
if len(ctx.Repo.Repository.Name) == 0 || ctx.Repo.Repository.Name != ctx.Query("repository") {
ctx.Data["ErrorMsg"] = "Please make sure you entered repository name is correct."
- ctx.Render.HTML(200, "repo/setting", ctx.Data)
+ ctx.HTML(200, "repo/setting", ctx.Data)
return
}
@@ -55,5 +55,5 @@ func SettingPost(ctx *middleware.Context) {
}
log.Trace("%s Repository deleted: %s/%s", ctx.Req.RequestURI, ctx.User.LowerName, ctx.Repo.Repository.LowerName)
- ctx.Render.Redirect("/", 302)
+ ctx.Redirect("/", 302)
}