Implement FederationEnabled function for templates
This commit is contained in:
parent
26eb01b509
commit
a6d45f8b97
|
@ -152,6 +152,9 @@ func NewFuncMap() template.FuncMap {
|
|||
"MermaidMaxSourceCharacters": func() int {
|
||||
return setting.MermaidMaxSourceCharacters
|
||||
},
|
||||
"FederationEnabled": func() bool {
|
||||
return setting.Federation.Enabled
|
||||
},
|
||||
|
||||
// -----------------------------------------------------------------
|
||||
// render
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue