From: Raphael Randschau Date: Thu, 5 Feb 2015 16:09:38 +0000 (+0100) Subject: Hide the registration button depending on the setting X-Git-Tag: v0.9.99~1490^2~1 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=3c65265871ce6d8305250ef870a751ebf47257ea;p=gitea.git Hide the registration button depending on the setting --- diff --git a/routers/home.go b/routers/home.go index dd604ec7e3..24fc77e12a 100644 --- a/routers/home.go +++ b/routers/home.go @@ -41,6 +41,7 @@ func Home(ctx *middleware.Context) { ctx.Data["OauthEnabled"] = true ctx.Data["OauthService"] = setting.OauthService } + ctx.Data["ShowRegistrationButton"] = setting.Service.ShowRegistrationButton ctx.Data["PageIsHome"] = true ctx.HTML(200, HOME) diff --git a/templates/home.tmpl b/templates/home.tmpl index 8603f26f41..29865dbf9a 100644 --- a/templates/home.tmpl +++ b/templates/home.tmpl @@ -14,7 +14,9 @@ + {{if .ShowRegistrationButton}} + {{end}}
{{template "ng/base/social" .}}