diff options
author | Piotr Orzechowski <piotr@orzechowski.tech> | 2018-08-27 04:23:27 +0200 |
---|---|---|
committer | techknowlogick <techknowlogick@users.noreply.github.com> | 2018-08-26 22:23:27 -0400 |
commit | 56d931aeac653ed948cbecf643fc74809b32dec3 (patch) | |
tree | c1087bf31abf4f31d1b87b605d5cf035531a0292 /modules | |
parent | 4ae5a54c1f9395fafafe50fcab45a705eeb03e48 (diff) | |
download | gitea-56d931aeac653ed948cbecf643fc74809b32dec3.tar.gz gitea-56d931aeac653ed948cbecf643fc74809b32dec3.zip |
Hide home button when landing page is not set to home (#4651)
Diffstat (limited to 'modules')
-rw-r--r-- | modules/context/context.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/context/context.go b/modules/context/context.go index a831873653..b9736e56ef 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 |