1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-11-24 08:57:03 -05:00

Implement FederationEnabled function for templates

This commit is contained in:
erik 2024-03-19 11:56:25 +01:00
parent 26eb01b509
commit a6d45f8b97
2 changed files with 4 additions and 3 deletions

View file

@ -152,6 +152,9 @@ func NewFuncMap() template.FuncMap {
"MermaidMaxSourceCharacters": func() int {
return setting.MermaidMaxSourceCharacters
},
"FederationEnabled": func() bool {
return setting.Federation.Enabled
},
// -----------------------------------------------------------------
// render

View file

@ -63,9 +63,7 @@
</form>
</div>
<!-- TODO: get true/false from settings -->
{{$showFederationSettings := true}}
{{if $showFederationSettings}}
{{if FederationEnabled}}
<h4 class="ui top attached header">
{{ctx.Locale.Tr "repo.settings.federation_settings"}}
</h4>