From f75838b35320675fb9bb0576bc9921f387097462 Mon Sep 17 00:00:00 2001 From: Henry Oswald Date: Thu, 14 Aug 2014 15:42:31 +0100 Subject: [PATCH] don't show the lng select if there is only 1 lang to show --- services/web/app/views/layout/footer.jade | 29 ++++++++++++----------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/services/web/app/views/layout/footer.jade b/services/web/app/views/layout/footer.jade index 17493d7ce0..39d9849be9 100644 --- a/services/web/app/views/layout/footer.jade +++ b/services/web/app/views/layout/footer.jade @@ -13,22 +13,23 @@ footer.site-footer .col-md-3 - .dropdown.dropup.subdued - a.dropdown-toggle( - href="#", - data-toggle="dropdown", - aria-haspopup="true", - aria-expanded="false" - ) #{translate("language")} - |   - img(src="/img/flags/24/#{currentLngCode}.png") + if Object.keys(settings.i18n.subdomainLang).length > 1 + .dropdown.dropup.subdued + a.dropdown-toggle( + href="#", + data-toggle="dropdown", + aria-haspopup="true", + aria-expanded="false" + ) #{translate("language")} + |   + img(src="/img/flags/24/#{currentLngCode}.png") - ul.dropdown-menu(role="menu") - each subdomainDetails, subdomain in settings.i18n.subdomainLang - li.lngOption - a.menu-indent(href=subdomainDetails.url+currentUrl) #{translate(subdomainDetails.lngCode)} + ul.dropdown-menu(role="menu") + each subdomainDetails, subdomain in settings.i18n.subdomainLang + li.lngOption + a.menu-indent(href=subdomainDetails.url+currentUrl) #{translate(subdomainDetails.lngCode)} - img(src="/img/flags/24/#{subdomainDetails.lngCode}.png") + img(src="/img/flags/24/#{subdomainDetails.lngCode}.png") ul.col-md-3