mirror of
https://github.com/openclassify/openclassify.git
synced 2026-01-24 22:11:01 -06:00
Merge branch 'muammertop' of https://github.com/openclassify/openclassify into m_alibaba
Conflicts: app/Providers/AppServiceProvider.php
This commit is contained in:
commit
efa10aea95
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
{% for key, navigation in template.cp.navigation %}
|
{% for key, navigation in template.cp.navigation %}
|
||||||
<li class="{{ navigation.active ? 'active' }} variant-border" data-slug="{{ navigation.slug }}">
|
<li class="{{ navigation.active ? 'active' }} {{ navigation.class }} variant-border" data-slug="{{ navigation.slug }}">
|
||||||
<a {{ html_attributes(navigation.attributes) }} title="{{ trans(navigation.title) }}">
|
<a {{ html_attributes(navigation.attributes) }} title="{{ trans(navigation.title) }}">
|
||||||
<span class="icon">{{ navigation.icon()|raw }}</span>
|
<span class="icon">{{ navigation.icon()|raw }}</span>
|
||||||
<span class="title">{{ trans(navigation.title) }}</span>
|
<span class="title">{{ trans(navigation.title) }}</span>
|
||||||
|
|||||||
@ -30,7 +30,7 @@
|
|||||||
<div class="dropdown-menu results">
|
<div class="dropdown-menu results">
|
||||||
<h6 class="dropdown-header">Navigation</h6>
|
<h6 class="dropdown-header">Navigation</h6>
|
||||||
{% for key, navigation in template.cp.navigation %}
|
{% for key, navigation in template.cp.navigation %}
|
||||||
<a class="dropdown-item" {{ html_attributes(navigation.attributes) }}>
|
<a class="dropdown-item" {{ html_attributes(navigation.attributes) }} {{ navigation.class }}>
|
||||||
<span class="title">{{ trans(navigation.title) }}</span>
|
<span class="title">{{ trans(navigation.title) }}</span>
|
||||||
</a>
|
</a>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|||||||
@ -14,9 +14,16 @@ class AppServiceProvider extends ServiceProvider
|
|||||||
*/
|
*/
|
||||||
public function boot()
|
public function boot()
|
||||||
{
|
{
|
||||||
//Auto Language Switcher
|
view()->composer('*', function ($view) {
|
||||||
view()->composer('*', function ($view) {
|
//Hidden menu items in sidebar on dashboard
|
||||||
if (config('advs.lang_switcher_for_browser') and is_null(Request()->session()->get('_locale')) and isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
|
if (auth()->check() and template()->get('cp')){
|
||||||
|
template()->get('cp')->getNavigation()->get('anomaly.module.variables')->setClass('hidden');
|
||||||
|
template()->get('cp')->getNavigation()->get('anomaly.module.system')->setClass('hidden');
|
||||||
|
template()->get('cp')->getNavigation()->get('anomaly.module.redirects')->setClass('hidden');
|
||||||
|
template()->get('cp')->getNavigation()->get('anomaly.module.repeaters')->setClass('hidden');
|
||||||
|
}
|
||||||
|
//Auto Language Switcher
|
||||||
|
if (config('advs.lang_switcher_for_browser') and is_null(Request()->session()->get('_locale')) and isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
|
||||||
$lang = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2);//Get Browser Language
|
$lang = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2);//Get Browser Language
|
||||||
$acceptLang = config('streams::locales.enabled'); //Supported Language
|
$acceptLang = config('streams::locales.enabled'); //Supported Language
|
||||||
$lang = in_array($lang, $acceptLang) ? $lang : config('streams::locales.default', 'en');
|
$lang = in_array($lang, $acceptLang) ? $lang : config('streams::locales.default', 'en');
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user