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:
thedeadparrot
2014-02-14 10:19:29 -05:00
committed by Julia Hansbrough
parent f6e14e62b5
commit afdd8d68cb
2 changed files with 4 additions and 1 deletions

View File

@@ -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:

View File

@@ -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">