jenkins-bot has submitted this change and it was merged.
Change subject: Don't redirect everything with oldid to MobileDiff
......................................................................
Don't redirect everything with oldid to MobileDiff
Bug: 49029
Change-Id: I44e51ae5a4935a8bd4330a59f3721f10dd8ae859
---
M includes/MobileContext.php
M includes/skins/MinervaTemplate.php
M includes/skins/SkinMinerva.php
M less/common/navigation.less
M stylesheets/common/navigation.css
5 files changed, 12 insertions(+), 6 deletions(-)
Approvals:
MaxSem: Looks good to me, but someone else must approve
Jdlrobson: Looks good to me, approved
jenkins-bot: Verified
diff --git a/includes/MobileContext.php b/includes/MobileContext.php
index 1a614a4..b98436f 100644
--- a/includes/MobileContext.php
+++ b/includes/MobileContext.php
@@ -291,8 +291,7 @@
*/
private function redirectMobileEnabledPages() {
$redirectUrl = null;
- if ( $this->getRequest()->getText( 'diff' ) ||
- $this->getRequest()->getText( 'oldid' ) ) {
+ if ( $this->getRequest()->getCheck( 'diff' ) ) {
$redirectUrl =
SpecialMobileDiff::getMobileUrlFromDesktop();
}
diff --git a/includes/skins/MinervaTemplate.php
b/includes/skins/MinervaTemplate.php
index c1aa2c9..466d706 100644
--- a/includes/skins/MinervaTemplate.php
+++ b/includes/skins/MinervaTemplate.php
@@ -109,7 +109,12 @@
<?php
if ( !$isSpecialPage ) {
echo $data['prebodytext'];
- $this->renderPageActions( $data );
+ // FIXME: Temporary solution until we
have design
+ if ( isset(
$data['_old_revision_warning'] ) ) {
+ echo
$data['_old_revision_warning'];
+ } else {
+ $this->renderPageActions( $data
);
+ }
}
?>
<div id="content" class="content">
diff --git a/includes/skins/SkinMinerva.php b/includes/skins/SkinMinerva.php
index dd16d92..e0d48d3 100644
--- a/includes/skins/SkinMinerva.php
+++ b/includes/skins/SkinMinerva.php
@@ -119,7 +119,11 @@
),
) );
$tpl->set( 'page_actions', array() );
-
+ if ( $out->getRequest()->getText( 'oldid' ) ) {
+ $subtitle = $out->getSubtitle();
+ $tpl->set( '_old_revision_warning',
+ Html::openElement( 'div', array( 'class' =>
'alert warning' ) ) . $subtitle . Html::closeElement( 'div' ) );
+ }
// Reuse template data variable from SkinTemplate to construct
page menu
$menu = array();
$namespaces = $tpl->data['content_navigation']['namespaces'];
diff --git a/less/common/navigation.less b/less/common/navigation.less
index 57f134f..dee78f5 100644
--- a/less/common/navigation.less
+++ b/less/common/navigation.less
@@ -37,7 +37,6 @@
padding: @overlayAlertPadding;
background-repeat: no-repeat;
background-position: @overlayAlertPaddingHorizontal center;
- margin-bottom: 1em;
min-height: 64px;
font-size: @baseFontSize;
diff --git a/stylesheets/common/navigation.css
b/stylesheets/common/navigation.css
index d70f6da..a0b60b3 100644
--- a/stylesheets/common/navigation.css
+++ b/stylesheets/common/navigation.css
@@ -31,7 +31,6 @@
padding: 0.5em 1em;
background-repeat: no-repeat;
background-position: 1em center;
- margin-bottom: 1em;
min-height: 64px;
font-size: 1em;
}
--
To view, visit https://gerrit.wikimedia.org/r/80067
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I44e51ae5a4935a8bd4330a59f3721f10dd8ae859
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: MaxSem <[email protected]>
Gerrit-Reviewer: Jdlrobson <[email protected]>
Gerrit-Reviewer: Maryana <[email protected]>
Gerrit-Reviewer: MaxSem <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits