mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-14 05:56:14 +01:00
Implement FederationEnabled function for templates
This commit is contained in:
parent
26eb01b509
commit
a6d45f8b97
2 changed files with 4 additions and 3 deletions
|
@ -152,6 +152,9 @@ func NewFuncMap() template.FuncMap {
|
||||||
"MermaidMaxSourceCharacters": func() int {
|
"MermaidMaxSourceCharacters": func() int {
|
||||||
return setting.MermaidMaxSourceCharacters
|
return setting.MermaidMaxSourceCharacters
|
||||||
},
|
},
|
||||||
|
"FederationEnabled": func() bool {
|
||||||
|
return setting.Federation.Enabled
|
||||||
|
},
|
||||||
|
|
||||||
// -----------------------------------------------------------------
|
// -----------------------------------------------------------------
|
||||||
// render
|
// render
|
||||||
|
|
|
@ -63,9 +63,7 @@
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- TODO: get true/false from settings -->
|
{{if FederationEnabled}}
|
||||||
{{$showFederationSettings := true}}
|
|
||||||
{{if $showFederationSettings}}
|
|
||||||
<h4 class="ui top attached header">
|
<h4 class="ui top attached header">
|
||||||
{{ctx.Locale.Tr "repo.settings.federation_settings"}}
|
{{ctx.Locale.Tr "repo.settings.federation_settings"}}
|
||||||
</h4>
|
</h4>
|
||||||
|
|
Loading…
Reference in a new issue