From dbaa891ec0b9ab2802e0f3e82e06457977a136ef Mon Sep 17 00:00:00 2001 From: Trevor Parscal Date: Tue, 27 Apr 2010 22:11:04 +0000 Subject: [PATCH] Added $wgVectorShowVariantName global configuration varaible which causes Vector to render the the variants drop-down menu with a label showing the current variant name. This is off by default, pending further research into it's user experience implications. Addresses bug #20193. --- RELEASE-NOTES | 4 ++++ includes/DefaultSettings.php | 7 +++++++ skins/Vector.php | 11 ++++++++++- 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index a781f8564e..fd0db3ca6a 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -60,6 +60,10 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN on, allowing skins to use .htc files which are not cross-domain friendly. * ajaxwatch now uses the API and JQuery, and can be used to animate arbitrary watch links, not just to watch the page the link is on. +* (bug 20193) Added $wgVectorShowVariantName global configuration varaible + which causes Vector to render the the variants drop-down menu with a label + showing the current variant name. This is off by default, pending further + research into it's user experience implications. === Bug fixes in 1.17 === * (bug 17560) Half-broken deletion moved image files to deletion archive diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index b5fd2e9fca..33ee435905 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -4202,6 +4202,13 @@ $wgVectorUseSimpleSearch = false; */ $wgVectorUseIconWatch = false; +/** + * Show the name of the current variant as a label in the variants drop-down menu + * true = Show the label + * false = Do not show the label + */ +$wgVectorShowVariantName = false; + /** * Add extra stylesheets for Vector - This is only being used so that we can play around with different options while * keeping our CSS code in the SVN and not having to change the main Vector styles. This will probably go away later on. diff --git a/skins/Vector.php b/skins/Vector.php index 74e346c111..e4c68b5ca5 100644 --- a/skins/Vector.php +++ b/skins/Vector.php @@ -676,7 +676,7 @@ class VectorTemplate extends QuickTemplate { * when UI is in RTL mode */ private function renderNavigation( $elements ) { - global $wgContLang, $wgVectorUseSimpleSearch, $wgStylePath; + global $wgContLang, $wgVectorUseSimpleSearch, $wgVectorShowVariantName, $wgStylePath; // If only one element was given, wrap it in an array, allowing more // flexible arguments @@ -707,6 +707,15 @@ class VectorTemplate extends QuickTemplate { case 'VARIANTS': ?>
+ +

+ data['variant_urls'] as $key => $link ): ?> + + + + +

+
msg('variants') ?>