hide language/theme menu if not more than 1 selection is available
This commit is contained in:
parent
21d8c27c92
commit
3f0a5a5b73
|
@ -92,6 +92,7 @@
|
|||
</li>
|
||||
{% endif %}
|
||||
|
||||
{% if config('locales')|length > 1 %}
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
{{ m.icon('translate') }}
|
||||
|
@ -100,6 +101,7 @@
|
|||
{{ menuLanguages()|join(" ")|raw }}
|
||||
</ul>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -243,10 +243,16 @@ class SettingsController extends BaseController
|
|||
$menu = [
|
||||
url('/settings/profile') => 'settings.profile',
|
||||
url('/settings/password') => 'settings.password',
|
||||
url('/settings/language') => 'settings.language',
|
||||
url('/settings/theme') => 'settings.theme',
|
||||
];
|
||||
|
||||
if (count(config('locales')) > 1) {
|
||||
$menu[url('/settings/language')] = 'settings.language';
|
||||
}
|
||||
|
||||
if (count(config('themes')) > 1) {
|
||||
$menu[url('/settings/theme')] = 'settings.theme';
|
||||
}
|
||||
|
||||
if (!empty(config('oauth'))) {
|
||||
$menu[url('/settings/oauth')] = ['title' => 'settings.oauth', 'hidden' => $this->checkOauthHidden()];
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue