diff --git a/modules/context/context.go b/modules/context/context.go index a8318736530ad..b9736e56ef303 100644 --- a/modules/context/context.go +++ b/modules/context/context.go @@ -261,9 +261,14 @@ func Contexter() macaron.Handler { log.Debug("Session ID: %s", sess.ID()) log.Debug("CSRF Token: %v", ctx.Data["CsrfToken"]) + ctx.Data["IsLandingPageHome"] = setting.LandingPageURL == setting.LandingPageHome + ctx.Data["IsLandingPageExplore"] = setting.LandingPageURL == setting.LandingPageExplore + ctx.Data["IsLandingPageOrganizations"] = setting.LandingPageURL == setting.LandingPageOrganizations + ctx.Data["ShowRegistrationButton"] = setting.Service.ShowRegistrationButton ctx.Data["ShowFooterBranding"] = setting.ShowFooterBranding ctx.Data["ShowFooterVersion"] = setting.ShowFooterVersion + ctx.Data["EnableSwagger"] = setting.API.EnableSwagger ctx.Data["EnableOpenIDSignIn"] = setting.Service.EnableOpenIDSignIn diff --git a/templates/base/head.tmpl b/templates/base/head.tmpl index a5934149622d3..65eec65e591e9 100644 --- a/templates/base/head.tmpl +++ b/templates/base/head.tmpl @@ -153,15 +153,19 @@ {{if .IsSigned}} - {{.i18n.Tr "dashboard"}} - {{.i18n.Tr "issues"}} - {{.i18n.Tr "pull_requests"}} - {{else}} - {{.i18n.Tr "home"}} + {{.i18n.Tr "dashboard"}} + {{.i18n.Tr "issues"}} + {{.i18n.Tr "pull_requests"}} + {{.i18n.Tr "explore"}} + {{else if .IsLandingPageHome}} + {{.i18n.Tr "home"}} + {{.i18n.Tr "explore"}} + {{else if .IsLandingPageExplore}} + {{.i18n.Tr "home"}} + {{else if .IsLandingPageOrganizations}} + {{.i18n.Tr "home"}} {{end}} - {{.i18n.Tr "explore"}} - {{template "custom/extra_links" .}} {{/*