diff --git a/cmd/web.go b/cmd/web.go
index dfe47021c7..cb14b7c946 100644
--- a/cmd/web.go
+++ b/cmd/web.go
@@ -463,6 +463,8 @@ func runWeb(ctx *cli.Context) {
m.Post("/delete", repo.DeleteDeployKey)
})
+ }, func(ctx *middleware.Context) {
+ ctx.Data["PageIsSettings"] = true
})
}, reqSignIn, middleware.RepoAssignment(true), reqRepoAdmin, middleware.RepoRef())
diff --git a/routers/repo/release.go b/routers/repo/release.go
index e2a8d6f661..f06a831918 100644
--- a/routers/repo/release.go
+++ b/routers/repo/release.go
@@ -19,6 +19,7 @@ const (
func Releases(ctx *middleware.Context) {
ctx.Data["Title"] = ctx.Tr("repo.release.releases")
+ ctx.Data["PageIsReleaseList"] = true
rawTags, err := ctx.Repo.GitRepo.GetTags()
if err != nil {
@@ -138,12 +139,14 @@ func Releases(ctx *middleware.Context) {
func NewRelease(ctx *middleware.Context) {
ctx.Data["Title"] = ctx.Tr("repo.release.new_release")
+ ctx.Data["PageIsReleaseList"] = true
ctx.Data["tag_target"] = ctx.Repo.Repository.DefaultBranch
ctx.HTML(200, RELEASE_NEW)
}
func NewReleasePost(ctx *middleware.Context, form auth.NewReleaseForm) {
ctx.Data["Title"] = ctx.Tr("repo.release.new_release")
+ ctx.Data["PageIsReleaseList"] = true
if ctx.HasError() {
ctx.HTML(200, RELEASE_NEW)
@@ -196,6 +199,7 @@ func NewReleasePost(ctx *middleware.Context, form auth.NewReleaseForm) {
func EditRelease(ctx *middleware.Context) {
ctx.Data["Title"] = ctx.Tr("repo.release.edit_release")
+ ctx.Data["PageIsReleaseList"] = true
ctx.Data["PageIsEditRelease"] = true
tagName := ctx.Params(":tagname")
@@ -219,6 +223,7 @@ func EditRelease(ctx *middleware.Context) {
func EditReleasePost(ctx *middleware.Context, form auth.EditReleaseForm) {
ctx.Data["Title"] = ctx.Tr("repo.release.edit_release")
+ ctx.Data["PageIsReleaseList"] = true
ctx.Data["PageIsEditRelease"] = true
tagName := ctx.Params(":tagname")
diff --git a/templates/repo/sidebar.tmpl b/templates/repo/sidebar.tmpl
index 20d14a27df..ca38627bcf 100644
--- a/templates/repo/sidebar.tmpl
+++ b/templates/repo/sidebar.tmpl
@@ -6,14 +6,14 @@
{{.i18n.Tr "repo.pulls"}} {{.Repository.NumOpenPulls}}
-
+
{{.i18n.Tr "repo.commits"}} {{.CommitsCount}}
-
+
{{.i18n.Tr "repo.releases"}} {{.Repository.NumTags}}
{{if .IsRepositoryAdmin}}
-
+
{{.i18n.Tr "repo.settings"}}
{{end}}