diff options
author | Unknwon <u@gogs.io> | 2017-03-22 12:58:12 -0400 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2017-03-22 12:58:12 -0400 |
commit | bb86d66496078b8c2fb242b6286d682ff9d5aa2f (patch) | |
tree | b14d0d4d2934c6d1b77f828d6d24dc7f31407fcf /cmd | |
parent | aba87895426663fe166e4d81b81883f45ce957ce (diff) |
repo: rename PageIsViewCode -> PageIsViewFiles
Also highlight 'Files' tab when use editor.
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/web.go | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -534,7 +534,7 @@ func runWeb(ctx *cli.Context) error { m.Get("/edit/*", repo.EditRelease) m.Post("/edit/*", bindIgnErr(form.EditRelease{}), repo.EditReleasePost) }, repo.MustBeNotBare, reqRepoWriter, func(ctx *context.Context) { - ctx.Data["PageIsViewCode"] = true + ctx.Data["PageIsViewFiles"] = true }) // FIXME: Should use ctx.Repo.PullRequest to unify template, currently we have inconsistent URL @@ -569,6 +569,8 @@ func runWeb(ctx *cli.Context) error { ctx.NotFound() return } + + ctx.Data["PageIsViewFiles"] = true }) }, reqSignIn, context.RepoAssignment()) @@ -586,7 +588,7 @@ func runWeb(ctx *cli.Context) error { m.Get("/all", repo.AllBranches) m.Post("/delete/*", reqSignIn, reqRepoWriter, repo.DeleteBranchPost) }, repo.MustBeNotBare, func(ctx *context.Context) { - ctx.Data["PageIsViewCode"] = true + ctx.Data["PageIsViewFiles"] = true }) m.Group("/wiki", func() { |