jenkins-bot has submitted this change and it was merged.
Change subject: Tweaks to fallback editor
......................................................................
Tweaks to fallback editor
* Hide secondary actions and page actions in PHP rather than CSS
Bug: T125174
Change-Id: I7dd3e11db8f50bc96ac50a3036b119193862946e
---
M includes/skins/MinervaTemplate.php
M resources/skins.minerva.fallbackeditor/fallbackeditor.less
2 files changed, 10 insertions(+), 2 deletions(-)
Approvals:
Florianschmidtwelzow: Looks good to me, approved
Jdlrobson: Looks good to me, approved
jenkins-bot: Verified
diff --git a/includes/skins/MinervaTemplate.php
b/includes/skins/MinervaTemplate.php
index 15aaac2..3552dee 100644
--- a/includes/skins/MinervaTemplate.php
+++ b/includes/skins/MinervaTemplate.php
@@ -66,7 +66,7 @@
* @return array
*/
public function getPageActions() {
- return $this->data['page_actions'];
+ return $this->isFallbackEditor() ? array() :
$this->data['page_actions'];
}
/**
@@ -161,10 +161,18 @@
}
}
+ protected function isFallbackEditor() {
+ $action = $this->getSkin()->getRequest()->getVal( 'action' );
+ return $action === 'edit';
+ }
/**
* Get page secondary actions
*/
protected function getSecondaryActions() {
+ if ( $this->isFallbackEditor() ) {
+ return array();
+ }
+
$result = $this->data['secondary_actions'];
$hasLanguages = $this->data['content_navigation']['variants'] ||
$this->data['language_urls'];
diff --git a/resources/skins.minerva.fallbackeditor/fallbackeditor.less
b/resources/skins.minerva.fallbackeditor/fallbackeditor.less
index 8432932..320d678 100644
--- a/resources/skins.minerva.fallbackeditor/fallbackeditor.less
+++ b/resources/skins.minerva.fallbackeditor/fallbackeditor.less
@@ -3,7 +3,7 @@
@import "minerva.mixins";
@import "mediawiki.mixins";
-#page-secondary-actions, .editHelp, .cancelLink,
.mw-editButtons-pipe-separator {
+.editHelp, .cancelLink, .mw-editButtons-pipe-separator {
display: none;
}
--
To view, visit https://gerrit.wikimedia.org/r/271164
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I7dd3e11db8f50bc96ac50a3036b119193862946e
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson <[email protected]>
Gerrit-Reviewer: Florianschmidtwelzow <[email protected]>
Gerrit-Reviewer: Jdlrobson <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits