https://www.mediawiki.org/wiki/Special:Code/MediaWiki/114260

Revision: 114260
Author:   jdlrobson
Date:     2012-03-20 13:29:52 +0000 (Tue, 20 Mar 2012)
Log Message:
-----------
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
    trunk/extensions/MobileFrontend/templates/SearchTemplate.php

Modified: trunk/extensions/MobileFrontend/MobileFrontend.body.php
===================================================================
--- trunk/extensions/MobileFrontend/MobileFrontend.body.php     2012-03-20 
13:14:31 UTC (rev 114259)
+++ trunk/extensions/MobileFrontend/MobileFrontend.body.php     2012-03-20 
13:29:52 UTC (rev 114260)
@@ -1131,6 +1131,7 @@
                wfProfileIn( __METHOD__ );
                $searchTemplate = new SearchTemplate();
                $options = array(
+                                               'viewNormalSiteURL' => 
self::$viewNormalSiteURL,
                                                'searchField' => 
self::$searchField,
                                                'mainPageUrl' => 
self::$mainPageUrl,
                                                'randomPageUrl' => 
self::$randomPageUrl,

Modified: trunk/extensions/MobileFrontend/templates/SearchTemplate.php
===================================================================
--- trunk/extensions/MobileFrontend/templates/SearchTemplate.php        
2012-03-20 13:14:31 UTC (rev 114259)
+++ trunk/extensions/MobileFrontend/templates/SearchTemplate.php        
2012-03-20 13:29:52 UTC (rev 114260)
@@ -28,6 +28,9 @@
                $languageSelectionText = '<b>' . 
$this->data['messages']['mobile-frontend-language'] . ':</b><br/>';
                $languageSelectionDiv = $languageSelectionText . 
$languageSelection;
 
+               $regularSite = 
$this->data['messages']['mobile-frontend-regular-site'];
+               $viewNormalSiteURL = $this->data['viewNormalSiteURL'];
+
                $searchWebkitHtml = <<<HTML
                <div id='header'>
                        <div id='searchbox' {$logoDisplayNone}>
@@ -45,6 +48,7 @@
                        {$languageSelectionDiv}
                        <a href="{$mainPageUrl}" id="homeButton" 
class="button">{$homeButton}</a>
                        <a href="{$randomPageUrl}" id="randomButton" 
class="button">{$randomButton}</a>
+                       <a href="{$viewNormalSiteURL}" 
class="button">{$regularSite}</a>
                  </div>
                </div>
                {$openSearchResults}


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to