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
This commit is contained in:
committed by
Julia Hansbrough
parent
f6e14e62b5
commit
afdd8d68cb
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user