svn: /web/php/trunk/ include/shared-manual.inc styles/structure.css styles/theme.css

From: Date: Sat, 01 Jan 2011 15:03:27 +0000
Subject: svn: /web/php/trunk/ include/shared-manual.inc styles/structure.css styles/theme.css
Groups: php.webmaster 
Request: Send a blank email to php-webmaster+get-10144@lists.php.net to get a copy of this message
bjori Sat, 01 Jan 2011 15:03:27 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=306947 Log: Add the language chooser back Changed paths: U web/php/trunk/include/shared-manual.inc U web/php/trunk/styles/structure.css U web/php/trunk/styles/theme.css Modified: web/php/trunk/include/shared-manual.inc =================================================================== --- web/php/trunk/include/shared-manual.inc 2011-01-01 13:25:37 UTC (rev 306946) +++ web/php/trunk/include/shared-manual.inc 2011-01-01 15:03:27 UTC (rev 306947) @@ -531,8 +531,40 @@ $_SERVER["BASE_PAGE"] = "/manual/" . $setup["head"][1] . "/" . $setup["this"][0]; site_header($setup["this"][1] . " - Manual ", array("current" => "docs", "leftmenu" => $menu)); echo '<aside id="quicktoc"></aside>'; + + manual_language_chooser($setup['head'][1], $setup['this'][0]); } +function manual_language_chooser($currentlang, $currentpage) { + global $ACTIVE_ONLINE_LANGUAGES; + + $links = array(); + + foreach ($ACTIVE_ONLINE_LANGUAGES as $lang => $name) { + $links[] = array("$lang/$currentpage", $name, $lang); + } + $links[] = array('help-translate.php', 'Other'); + + // Print out the form with all the options + echo <<< FORM +<form action="/manual/change.php" method="get" id="changelang"> + <fieldset> + <select name="page" id="changelang-langs"> +FORM; + foreach ($links as $link) { + echo "<option value='{$link[0]}' " .($link[2] == $currentlang ? "selected" : ""). ">{$link[1]}</option>\n"; + } + echo <<< FORM + </select> + <input type="submit" + value="Go" + id="changelang-submit" + class="submit" /> + </fieldset> +</form> +FORM; +} + function manual_header_beta(){} function manual_footer_beta() { echo "</section>"; Modified: web/php/trunk/styles/structure.css =================================================================== --- web/php/trunk/styles/structure.css 2011-01-01 13:25:37 UTC (rev 306946) +++ web/php/trunk/styles/structure.css 2011-01-01 15:03:27 UTC (rev 306947) @@ -50,7 +50,9 @@ width: 14em; } -#headsearch-submit { +#headsearch-submit, +#changelang-submit +{ border: 0; margin: 1px; padding: 2px 5px; Modified: web/php/trunk/styles/theme.css =================================================================== --- web/php/trunk/styles/theme.css 2011-01-01 13:25:37 UTC (rev 306946) +++ web/php/trunk/styles/theme.css 2011-01-01 15:03:27 UTC (rev 306947) @@ -80,7 +80,9 @@ border-radius: 5px; } -#headsearch-keywords { +#headsearch-keywords, +#changelang-langs +{ color: #666; background: transparent; -webkit-appearance: none; @@ -90,7 +92,9 @@ color: #000; } -#headsearch-submit { +#headsearch-submit, +#changelang-submit +{ border-color: #987db3; -moz-border-radius: 5px; -webkit-border-radius: 5px; @@ -99,6 +103,14 @@ background: #604080; color: #fff; } +#changelang { + border-color: #987db3; + -moz-border-radius: 5px; + -webkit-border-radius: 5px; + border-radius: 5px; + border: 1px solid #604080; + float: right; +} #headnav li dl { line-height: 1; @@ -290,3 +302,7 @@ } /* }}} */ +#langform { + float: right; +} +

« previous php.webmaster (#10144) next »