diff options
Diffstat (limited to 'routers/repo/single.go')
-rw-r--r-- | routers/repo/single.go | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/routers/repo/single.go b/routers/repo/single.go index 2bc77c1c01..6eb839c10d 100644 --- a/routers/repo/single.go +++ b/routers/repo/single.go @@ -38,7 +38,7 @@ func Branches(ctx *middleware.Context, params martini.Params) { ctx.Data["Branches"] = brs ctx.Data["IsRepoToolbarBranches"] = true - ctx.HTML(200, "repo/branches", ctx.Data) + ctx.HTML(200, "repo/branches") } func Single(ctx *middleware.Context, params martini.Params) { @@ -59,6 +59,8 @@ func Single(ctx *middleware.Context, params martini.Params) { return } + ctx.Data["IsRepoToolbarSource"] = true + // Branches. brs, err := models.GetBranches(params["username"], params["reponame"]) if err != nil { @@ -67,7 +69,7 @@ func Single(ctx *middleware.Context, params martini.Params) { return } else if len(brs) == 0 { ctx.Data["IsBareRepo"] = true - ctx.HTML(200, "repo/single", ctx.Data) + ctx.HTML(200, "repo/single") return } @@ -175,9 +177,8 @@ func Single(ctx *middleware.Context, params martini.Params) { ctx.Data["Paths"] = Paths ctx.Data["Treenames"] = treenames - ctx.Data["IsRepoToolbarSource"] = true ctx.Data["BranchLink"] = branchLink - ctx.HTML(200, "repo/single", ctx.Data) + ctx.HTML(200, "repo/single") } func Setting(ctx *middleware.Context, params martini.Params) { @@ -186,6 +187,8 @@ func Setting(ctx *middleware.Context, params martini.Params) { return } + ctx.Data["IsRepoToolbarSetting"] = true + // Branches. brs, err := models.GetBranches(params["username"], params["reponame"]) if err != nil { @@ -194,7 +197,7 @@ func Setting(ctx *middleware.Context, params martini.Params) { return } else if len(brs) == 0 { ctx.Data["IsBareRepo"] = true - ctx.HTML(200, "repo/setting", ctx.Data) + ctx.HTML(200, "repo/setting") return } @@ -204,8 +207,7 @@ func Setting(ctx *middleware.Context, params martini.Params) { } ctx.Data["Title"] = title + " - settings" - ctx.Data["IsRepoToolbarSetting"] = true - ctx.HTML(200, "repo/setting", ctx.Data) + ctx.HTML(200, "repo/setting") } func Commits(ctx *middleware.Context, params martini.Params) { @@ -229,17 +231,17 @@ func Commits(ctx *middleware.Context, params martini.Params) { ctx.Data["Reponame"] = params["reponame"] ctx.Data["CommitCount"] = commits.Len() ctx.Data["Commits"] = commits - ctx.HTML(200, "repo/commits", ctx.Data) + ctx.HTML(200, "repo/commits") } func Issues(ctx *middleware.Context) { ctx.Data["IsRepoToolbarIssues"] = true - ctx.HTML(200, "repo/issues", ctx.Data) + ctx.HTML(200, "repo/issues") } func Pulls(ctx *middleware.Context) { ctx.Data["IsRepoToolbarPulls"] = true - ctx.HTML(200, "repo/pulls", ctx.Data) + ctx.HTML(200, "repo/pulls") } func Action(ctx *middleware.Context, params martini.Params) { |