Jdlrobson has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/317738

Change subject: Clear content to avoid user page float issues
......................................................................

Clear content to avoid user page float issues

Post content container should always be present
even if empty

Bug: T147891
Change-Id: I81bb7b2ce7195a5e77436ab76848379e07d363c4
---
M includes/skins/MinervaTemplate.php
1 file changed, 9 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend 
refs/changes/38/317738/1

diff --git a/includes/skins/MinervaTemplate.php 
b/includes/skins/MinervaTemplate.php
index 0cf9079..c1f6c4a 100644
--- a/includes/skins/MinervaTemplate.php
+++ b/includes/skins/MinervaTemplate.php
@@ -197,23 +197,22 @@
         * @return string
         */
        protected function getSecondaryActionsHtml() {
-               // no secondary actions on the user page
-               if ( $this->getSkin()->isUserPage ) {
-                       return '';
-               }
                $baseClass = MobileUI::buttonClass( '', 'button' );
                $html = Html::openElement( 'div', [
                        'class' => 'post-content',
                        'id' => 'page-secondary-actions'
                ] );
 
-               foreach ( $this->getSecondaryActions() as $el ) {
-                       if ( isset( $el['attributes']['class'] ) ) {
-                               $el['attributes']['class'] .= ' ' . $baseClass;
-                       } else {
-                               $el['attributes']['class'] = $baseClass;
+               // no secondary actions on the user page
+               if ( $this->getSkin()->isUserPage ) {
+                       foreach ( $this->getSecondaryActions() as $el ) {
+                               if ( isset( $el['attributes']['class'] ) ) {
+                                       $el['attributes']['class'] .= ' ' . 
$baseClass;
+                               } else {
+                                       $el['attributes']['class'] = $baseClass;
+                               }
+                               $html .= Html::element( 'a', $el['attributes'], 
$el['label'] );
                        }
-                       $html .= Html::element( 'a', $el['attributes'], 
$el['label'] );
                }
 
                return $html . Html::closeElement( 'div' );

-- 
To view, visit https://gerrit.wikimedia.org/r/317738
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I81bb7b2ce7195a5e77436ab76848379e07d363c4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson <jrob...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to