unicorn commit: + added a label and a globe icon to the language selection dropdown

changeset:   1433:9913adc7504e
tag:         tip
user:        Thomas Gambet <tgambet@w3.org>
date:        Fri Aug 06 11:54:16 2010 -0400
files:       WebContent/WEB-INF/resources/templates/includes/footer.vm WebContent/images/globe.png WebContent/images/globe2.png WebContent/style/base_ucn.css
description:
+ added a label and a globe icon to the language selection dropdown
~ removed dropdown from translation page


diff -r a0611296cc43 -r 9913adc7504e WebContent/WEB-INF/resources/templates/includes/footer.vm
--- a/WebContent/WEB-INF/resources/templates/includes/footer.vm	Fri Aug 06 15:26:23 2010 +0200
+++ b/WebContent/WEB-INF/resources/templates/includes/footer.vm	Fri Aug 06 11:54:16 2010 -0400
@@ -4,6 +4,8 @@
 			<li><a href="http://code.w3.org/unicorn/#Feedback" title="$feedback_title">$feedback</a></li>
 			<li><a href="${baseUri}translations" hreflang="en" title="$translations_title">$translations</a></li>
 	</ul>
+	
+#if ($languages.size() > 1)
 	<form action="$!{language_action}" method="get" id="lang_choice">
 		<fieldset>
 #foreach( $key in $requestParameters.keySet() )
@@ -11,7 +13,8 @@
 	<input type="hidden" name="$key" value="$requestParameters.get($key)"/>
 	#end
 #end
-		<select name="ucn_lang">
+		<label for="ucn_lang">Language</label>
+		<select name="ucn_lang" id="ucn_lang">
 #foreach( $locale in $languages )
 #if ($locale.getName() != "lolcat" && $locale.getName() != "l33t" && $locale.getName() != "buccaneer")
 #set($localeName = $locale.getDisplayName($locale))
@@ -19,7 +22,7 @@
 			<option value="$lang" selected="selected">$localeName</option>
 #else
 #set($langKey = $strUtils.replace($locale.getName(), '_', '-'))
-			<option value="$langKey">$localeName ($locale.getDisplayName($currentLocale))</option>
+			<option value="$langKey" lang="$langKey" xml:lang="$langKey">$localeName ($locale.getDisplayName($currentLocale))</option>
 #end
 #end
 #end
@@ -27,6 +30,9 @@
 		<input id="lang_change" type="submit" value="OK" />
 		</fieldset>
 	</form>
+#else
+<div id="lang_choice">$currentLocale.getDisplayLanguage($currentLocale)</div>
+#end
 	
 	<div id="footer">
 		<p id="activity_logos">
diff -r a0611296cc43 -r 9913adc7504e WebContent/images/globe.png
Binary file WebContent/images/globe.png has changed
diff -r a0611296cc43 -r 9913adc7504e WebContent/images/globe2.png
Binary file WebContent/images/globe2.png has changed
diff -r a0611296cc43 -r 9913adc7504e WebContent/style/base_ucn.css
--- a/WebContent/style/base_ucn.css	Fri Aug 06 15:26:23 2010 +0200
+++ b/WebContent/style/base_ucn.css	Fri Aug 06 11:54:16 2010 -0400
@@ -207,6 +207,19 @@
 	right:0;
 	top:0;
 	height:1em;
+}
+#lang_choice label {
+	background-image:url(../images/globe.png);
+	height:0px;
+	width:20px;
+	padding-top:20px;
+	overflow:hidden;
+	display:inline-block;
+	vertical-align:bottom;
+}
+div#lang_choice {
+	font-size:0.8em;
+	margin:0.2em 2.5em 0 0;
 }
 #lang_choice select {
 	font-size:0.7em;

Received on Friday, 6 August 2010 15:54:44 UTC