diff --git a/modules/templates/helper.go b/modules/templates/helper.go index bcb94bff25..9b2668d318 100644 --- a/modules/templates/helper.go +++ b/modules/templates/helper.go @@ -152,6 +152,9 @@ func NewFuncMap() template.FuncMap { "MermaidMaxSourceCharacters": func() int { return setting.MermaidMaxSourceCharacters }, + "FederationEnabled": func() bool { + return setting.Federation.Enabled + }, // ----------------------------------------------------------------- // render diff --git a/templates/repo/settings/options.tmpl b/templates/repo/settings/options.tmpl index 4bcbe0777f..0aba59c794 100644 --- a/templates/repo/settings/options.tmpl +++ b/templates/repo/settings/options.tmpl @@ -63,9 +63,7 @@ - - {{$showFederationSettings := true}} - {{if $showFederationSettings}} + {{if FederationEnabled}}

{{ctx.Locale.Tr "repo.settings.federation_settings"}}