Commit afdd8d68 by thedeadparrot Committed by Julia Hansbrough

Better dashboard display behavior

* Don't show sidebar if only one language is present
* only add in the default language code if it's not already present
parent f6e14e62
......@@ -472,7 +472,8 @@ def dashboard(request):
language_options = DarkLangConfig.current().released_languages_list
language_options.append(settings.LANGUAGE_CODE)
if settings.LANGUAGE_CODE not in language_options:
language_options.append(settings.LANGUAGE_CODE)
cur_lang_code = UserPreference.get_preference(request.user, LANGUAGE_KEY)
if cur_lang_code:
......
......@@ -206,7 +206,9 @@
</span> <span class="data">${ user.email | h }</span>
</li>
%if len(language_options) > 1:
<%include file='dashboard/_dashboard_info_language.html' />
%endif
% if external_auth_map is None or 'shib' not in external_auth_map.external_domain:
<li class="controls--account">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment