Added $wgVectorShowVariantName global configuration varaible which causes Vector...
authorTrevor Parscal <tparscal@users.mediawiki.org>
Tue, 27 Apr 2010 22:11:04 +0000 (22:11 +0000)
committerTrevor Parscal <tparscal@users.mediawiki.org>
Tue, 27 Apr 2010 22:11:04 +0000 (22:11 +0000)
RELEASE-NOTES
includes/DefaultSettings.php
skins/Vector.php

index a781f85..fd0db3c 100644 (file)
@@ -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
index b5fd2e9..33ee435 100644 (file)
@@ -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.
index 74e346c..e4c68b5 100644 (file)
@@ -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':
 ?>
 <div id="p-variants" class="vectorMenu<?php if ( count( $this->data['variant_urls'] ) == 0 ) echo ' emptyPortlet'; ?>">
+       <?php if ( $wgVectorShowVariantName ): ?>
+               <h4>
+               <?php foreach ($this->data['variant_urls'] as $key => $link ): ?>
+                       <?php if ( stripos( $link['attributes'], 'selected' ) !== false ): ?>
+                               <?php echo htmlspecialchars( $link['text'] ) ?>
+                       <?php endif; ?>
+               <?php endforeach; ?>
+               </h4>
+       <?php endif; ?>
        <h5><span><?php $this->msg('variants') ?></span><a href="#"></a></h5>
        <div class="menu">
                <?php if ( count( $this->data['variant_urls'] ) ): ?>