summaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
authorLukas Fleischer <archlinux@cryptocrack.de>2011-12-17 02:21:03 +0100
committerLukas Fleischer <archlinux@cryptocrack.de>2012-07-06 11:26:47 +0200
commit091c2b5f5523773604699b914c19e6b02ce290bc (patch)
tree69dd0dcf90d6e7dc1076cdaca798f6eae338162b /web
parent16e250b69d575491cd7397496969d3f73c5bd478 (diff)
downloadaurweb-091c2b5f5523773604699b914c19e6b02ce290bc.tar.xz
Move language selection to a drop-down list
Move all languages to a select container to save some space. Language selection is a rarely used feature, so there's no need to make this a one click option. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Diffstat (limited to 'web')
-rw-r--r--web/html/css/aur.css3
-rw-r--r--web/template/header.php32
2 files changed, 23 insertions, 12 deletions
diff --git a/web/html/css/aur.css b/web/html/css/aur.css
index 181d043..741446e 100644
--- a/web/html/css/aur.css
+++ b/web/html/css/aur.css
@@ -1 +1,4 @@
/* AUR-specific customizations to "archweb.css". */
+#lang_sub {
+ float: right;
+}
diff --git a/web/template/header.php b/web/template/header.php
index 018e23e..023c44d 100644
--- a/web/template/header.php
+++ b/web/template/header.php
@@ -31,6 +31,26 @@
</div><!-- #archnavbar -->
<div id="content">
+ <div id="lang_sub">
+ <form method="get" action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"], ENT_QUOTES) ?>">
+ <fieldset>
+ <div>
+ <select name="setlang" id="id_setlang">
+ <?php
+ reset($SUPPORTED_LANGS);
+ foreach ($SUPPORTED_LANGS as $lang => $lang_name) {
+
+ print '<option value="' . strtolower($lang) . '"' .
+ ($lang == $LANG ? ' selected="selected"' : '') .
+ '>' . strtolower($lang) . "</option>\n";
+ }
+ ?>
+ </select>
+ <input type="submit" value="Go" />
+ </div>
+ </fieldset>
+ </form>
+ </div>
<div id="archdev-navbar">
<ul>
<li><a href="index.php">AUR <?php print __("Home"); ?></a></li>
@@ -47,17 +67,5 @@
<?php endif; ?>
</ul>
</div><!-- #archdev-navbar -->
-
- <div id="lang_sub">
- <?php
- reset($SUPPORTED_LANGS);
- foreach ($SUPPORTED_LANGS as $lang => $lang_name) {
- print '<a href="'
- . htmlspecialchars($_SERVER["PHP_SELF"], ENT_QUOTES)
- ."?setlang=" . htmlspecialchars($lang, ENT_QUOTES) . "\" title=\"" . htmlspecialchars($lang_name, ENT_QUOTES) . "\">"
- . htmlspecialchars(strtolower($lang)) . "</a>\n";
- }
- ?>
- </div>
<!-- Start of main content -->