r114260 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r114259‎ | r114260 | r114261 >
Date:13:29, 20 March 2012
Author:jdlrobson
Status:ok
Tags:
Comment:
add desktop view button to navigation menu

this is in preparation for the footer redesign
which will remove the desktop view

it also makes sense to have this near the top as
some users will quickly want to toggle to the desktop
site
Modified paths:
  • /trunk/extensions/MobileFrontend/MobileFrontend.body.php (modified) (history)
  • /trunk/extensions/MobileFrontend/templates/SearchTemplate.php (modified) (history)

Diff [purge]

Index: trunk/extensions/MobileFrontend/MobileFrontend.body.php
@@ -1131,6 +1131,7 @@
11321132 wfProfileIn( __METHOD__ );
11331133 $searchTemplate = new SearchTemplate();
11341134 $options = array(
 1135+ 'viewNormalSiteURL' => self::$viewNormalSiteURL,
11351136 'searchField' => self::$searchField,
11361137 'mainPageUrl' => self::$mainPageUrl,
11371138 'randomPageUrl' => self::$randomPageUrl,
Index: trunk/extensions/MobileFrontend/templates/SearchTemplate.php
@@ -28,6 +28,9 @@
2929 $languageSelectionText = '<b>' . $this->data['messages']['mobile-frontend-language'] . ':</b><br/>';
3030 $languageSelectionDiv = $languageSelectionText . $languageSelection;
3131
 32+ $regularSite = $this->data['messages']['mobile-frontend-regular-site'];
 33+ $viewNormalSiteURL = $this->data['viewNormalSiteURL'];
 34+
3235 $searchWebkitHtml = <<<HTML
3336 <div id='header'>
3437 <div id='searchbox' {$logoDisplayNone}>
@@ -45,6 +48,7 @@
4649 {$languageSelectionDiv}
4750 <a href="{$mainPageUrl}" id="homeButton" class="button">{$homeButton}</a>
4851 <a href="{$randomPageUrl}" id="randomButton" class="button">{$randomButton}</a>
 52+ <a href="{$viewNormalSiteURL}" class="button">{$regularSite}</a>
4953 </div>
5054 </div>
5155 {$openSearchResults}

Status & tagging log