diff --git a/routers/repo/repo.go b/routers/repo/repo.go index 23f8ea107..116c199b7 100644 --- a/routers/repo/repo.go +++ b/routers/repo/repo.go @@ -67,20 +67,3 @@ func Delete(ctx *middleware.Context, form auth.DeleteRepoForm) { ctx.Render.Redirect("/", 302) } - -func List(ctx *middleware.Context) { - if ctx.User != nil { - ctx.Render.Redirect("/") - return - } - - ctx.Data["Title"] = "Repositories" - repos, err := models.GetRepositories(ctx.User) - if err != nil { - ctx.Handle(200, "repo.List", err) - return - } - - ctx.Data["Repos"] = repos - ctx.Render.HTML(200, "repo/list", ctx.Data) -} diff --git a/routers/repo/single.go b/routers/repo/single.go index bd5cfa119..a7f07898f 100644 --- a/routers/repo/single.go +++ b/routers/repo/single.go @@ -43,7 +43,6 @@ func Single(ctx *middleware.Context, params martini.Params) { ctx.Data["Treenames"] = treenames ctx.Data["IsRepoToolbarSource"] = true ctx.Data["Files"] = files - ctx.Render.HTML(200, "repo/single", ctx.Data) } diff --git a/routers/user/user.go b/routers/user/user.go index 4ba7da161..8d8691a39 100644 --- a/routers/user/user.go +++ b/routers/user/user.go @@ -60,7 +60,12 @@ func Profile(ctx *middleware.Context, params martini.Params) { } ctx.Data["Feeds"] = feeds default: - + repos, err := models.GetRepositories(user) + if err != nil { + ctx.Handle(200, "user.Profile", err) + return + } + ctx.Data["Repos"] = repos } ctx.Render.HTML(200, "user/profile", ctx.Data) diff --git a/templates/user/dashboard.tmpl b/templates/user/dashboard.tmpl index 306c3bc15..547e8ab55 100644 --- a/templates/user/dashboard.tmpl +++ b/templates/user/dashboard.tmpl @@ -4,9 +4,9 @@
{{.Description}}
+ {{end}} +