Highlight the default language in the lang switcher

This commit is contained in:
Flavio Copes
2015-08-17 17:43:39 +02:00
parent 874d905297
commit 8065b6e537
4 changed files with 14 additions and 5 deletions

View File

@@ -907,6 +907,8 @@ tr {
color: #fff;
text-decoration: none;
background-color: #349886; }
.button-group .dropdown-menu.language-switcher a.active {
background-color: #349886; }
.open > .dropdown-menu {
display: block; }

File diff suppressed because one or more lines are too long

View File

@@ -100,6 +100,12 @@
background-color: $secondary-accent-bg;
}
}
&.language-switcher {
a.active {
background-color: #349886
}
}
}
}
@@ -114,4 +120,4 @@
bottom: 0;
left: 0;
z-index: 990;
}
}

View File

@@ -19,6 +19,8 @@
{% set warn = config.plugins.admin.warnings.delete_page %}
{% set admin_lang = admin.session.admin_lang ?: 'en' %}
{% block stylesheets %}
{% if mode == 'edit' %}
{% do assets.addCss(theme_url~'/css/codemirror/codemirror.css') %}
@@ -84,15 +86,14 @@
<button type="button" class="button dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-language"></i> {{ "PLUGIN_ADMIN.SWITCH_LANGUAGE"|tu }} &nbsp; <i class="fa fa-caret-down"></i>
</button>
<ul class="dropdown-menu">
<ul class="dropdown-menu language-switcher">
{% for language in admin.languages_enabled %}
<li><a class="button" href="{{ base_url_relative }}{{ theme.slug }}/pages/task{{ config.system.param_sep }}switchlanguage/lang{{ config.system.param_sep }}{{language}}"><i class="fa fa-fw fa-plus"></i> {{language}}</a></li>
<li><a class="button {% if admin_lang == language %}active{% endif %}" href="{{ base_url_relative }}{{ theme.slug }}/pages/task{{ config.system.param_sep }}switchlanguage/lang{{ config.system.param_sep }}{{language}}"><i class="fa fa-fw fa-plus"></i> {{language}}</a></li>
{% endfor %}
</ul>
</div>
{% endif %}
{% elseif mode == 'edit' %}
<a class="button" href="{{ base_url }}/pages"><i class="fa fa-reply"></i> {{ "PLUGIN_ADMIN.BACK"|tu }}</a>
{% if exists %}