aboutsummaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2017-03-11 02:13:42 -0500
committerUnknwon <u@gogs.io>2017-03-11 02:13:42 -0500
commit61e2bff757516d26772c78259961d8fefeae4bdb (patch)
tree991d50bbaad89ed68c94ebc195dccfd3dd053e40 /cmd
parent9713016637d2a034e2977133d2526709ce21dd38 (diff)
repo: commits, branches and releases should highlight files tab
Diffstat (limited to 'cmd')
-rw-r--r--cmd/web.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/cmd/web.go b/cmd/web.go
index 893b3e2d..e41bc9d4 100644
--- a/cmd/web.go
+++ b/cmd/web.go
@@ -529,7 +529,9 @@ func runWeb(ctx *cli.Context) error {
m.Post("/delete", repo.DeleteRelease)
m.Get("/edit/*", repo.EditRelease)
m.Post("/edit/*", bindIgnErr(form.EditRelease{}), repo.EditReleasePost)
- }, reqRepoWriter)
+ }, reqRepoWriter, func(ctx *context.Context) {
+ ctx.Data["PageIsViewCode"] = true
+ })
// FIXME: Should use ctx.Repo.PullRequest to unify template, currently we have inconsistent URL
// for PR in same repository. After select branch on the page, the URL contains redundant head user name.
@@ -579,6 +581,8 @@ func runWeb(ctx *cli.Context) error {
m.Get("", repo.Branches)
m.Get("/all", repo.AllBranches)
m.Post("/delete/*", reqSignIn, reqRepoWriter, repo.DeleteBranchPost)
+ }, func(ctx *context.Context) {
+ ctx.Data["PageIsViewCode"] = true
})
m.Group("/wiki", func() {