parent
4565dd406b
commit
c2c9db737b
2 changed files with 8 additions and 3 deletions
|
@ -45,6 +45,9 @@ func (f *funcMap) Map() template.FuncMap {
|
||||||
"hasOAuth2Provider": func(provider string) bool {
|
"hasOAuth2Provider": func(provider string) bool {
|
||||||
return config.Opts.OAuth2Provider() == provider
|
return config.Opts.OAuth2Provider() == provider
|
||||||
},
|
},
|
||||||
|
"hasAuthProxy": func() bool {
|
||||||
|
return config.Opts.AuthProxyHeader() != ""
|
||||||
|
},
|
||||||
"route": func(name string, args ...interface{}) string {
|
"route": func(name string, args ...interface{}) string {
|
||||||
return route.Path(f.router, name, args...)
|
return route.Path(f.router, name, args...)
|
||||||
},
|
},
|
||||||
|
|
|
@ -82,9 +82,11 @@
|
||||||
<li {{ if eq .menu "settings" }}class="active"{{ end }} title="{{ t "tooltip.keyboard_shortcuts" "g s" }}">
|
<li {{ if eq .menu "settings" }}class="active"{{ end }} title="{{ t "tooltip.keyboard_shortcuts" "g s" }}">
|
||||||
<a href="{{ route "settings" }}" data-page="settings">{{ t "menu.settings" }}</a>
|
<a href="{{ route "settings" }}" data-page="settings">{{ t "menu.settings" }}</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
{{ if not hasAuthProxy }}
|
||||||
<a href="{{ route "logout" }}" title="{{ t "tooltip.logged_user" .user.Username }}">{{ t "menu.logout" }}</a>
|
<li>
|
||||||
</li>
|
<a href="{{ route "logout" }}" title="{{ t "tooltip.logged_user" .user.Username }}">{{ t "menu.logout" }}</a>
|
||||||
|
</li>
|
||||||
|
{{ end }}
|
||||||
</ul>
|
</ul>
|
||||||
<div class="search">
|
<div class="search">
|
||||||
<div class="search-toggle-switch {{ if $.searchQuery }}has-search-query{{ end }}">
|
<div class="search-toggle-switch {{ if $.searchQuery }}has-search-query{{ end }}">
|
||||||
|
|
Loading…
Reference in a new issue