$output = $pager->getBody();
if ( !$this->including() ) {
- $output = '<p>' . $pager->getNavigationBar() . '</p>' .
+ $output = $pager->getNavigationBar() .
$output .
- '<p>' . $pager->getNavigationBar() . '</p>';
+ $pager->getNavigationBar();
}
$out->addHTML( $output );
}
}
}
- return $this->msg( 'contribsub2' )->rawParams( $user, $links )->params( $userObj->getName() );
+ return Html::rawElement( 'div', [ 'class' => 'mw-contributions-user-tools' ],
+ $this->msg( 'contribsub2' )->rawParams( $user, $links )->params( $userObj->getName() )
+ );
}
/**
return $query;
}
+ /**
+ * Wrap the navigation bar in a p element with identifying class.
+ * In future we may want to change the `p` tag to a `div` and upstream
+ * this to the parent class.
+ *
+ * @return string HTML
+ */
+ function getNavigationBar() {
+ return Html::rawElement( 'p', [ 'class' => 'mw-pager-navigation-bar' ],
+ parent::getNavigationBar()
+ );
+ }
+
/**
* This method basically executes the exact same code as the parent class, though with
* a hook added, to allow extensions to add additional queries.