mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue
synced 2024-11-12 08:58:25 +00:00
Talk is at bottom of main page
In T214724 the talk tabs were removed from the main page in AMC mode, however this also removed the talk button altogether in AMC mode. This updates the logic. Talk tabs are also removed from the talk page for the main page as the tabs come as a pair. Bug: T214724 Bug: T216514 Change-Id: Ic7d54e323d9428fa222e27a86ec2f9d61ae1e5f5
This commit is contained in:
parent
b32056350a
commit
d3a95084c5
|
@ -40,6 +40,7 @@ class MinervaTemplate extends BaseTemplate {
|
|||
$this->isSpecialMobileMenuPage = $this->isSpecialPage &&
|
||||
$title->isSpecial( 'MobileMenu' );
|
||||
$this->isMainPage = $title->isMainPage();
|
||||
$this->isMainPageTalk = $title->getSubjectPage()->isMainPage();
|
||||
Hooks::run( 'MinervaPreRender', [ $this ] );
|
||||
$this->render( $this->data );
|
||||
}
|
||||
|
@ -236,6 +237,7 @@ class MinervaTemplate extends BaseTemplate {
|
|||
$preBodyHtml = isset( $data['prebodyhtml'] ) ? $data['prebodyhtml'] : '';
|
||||
$hasHeadingHolder = $internalBanner || $preBodyHtml || isset( $data['page_actions'] );
|
||||
$hasPageActions = !$this->isSpecialPage && !$this->isMainPage;
|
||||
$hasTalkTabs = $hasPageActions && !$this->isMainPageTalk;
|
||||
|
||||
// prepare template data
|
||||
$templateData = [
|
||||
|
@ -272,7 +274,7 @@ class MinervaTemplate extends BaseTemplate {
|
|||
'secondaryactionshtml' => $this->getSecondaryActionsHtml(),
|
||||
'footer' => $this->getFooterTemplateData( $data ),
|
||||
'isBeta' => $skin->getSkinOption( SkinMinerva::OPTIONS_MOBILE_BETA ),
|
||||
'tabs' => $hasPageActions && $skin->getSkinOption( SkinMinerva::OPTIONS_TALK_AT_TOP ) ? [
|
||||
'tabs' => $hasTalkTabs && $skin->getSkinOption( SkinMinerva::OPTIONS_TALK_AT_TOP ) ? [
|
||||
'items' => array_values( $data['content_navigation']['namespaces'] ),
|
||||
] : false,
|
||||
];
|
||||
|
|
|
@ -1098,9 +1098,12 @@ class SkinMinerva extends SkinTemplate {
|
|||
// in beta it will be the entry point for the talk overlay feature,
|
||||
// in stable it will link to the wikitext talk page
|
||||
$title = $this->getTitle();
|
||||
$subjectPage = $title->getSubjectPage();
|
||||
$talkAtBottom = !$this->getSkinOption( self::OPTIONS_TALK_AT_TOP ) ||
|
||||
$subjectPage->isMainPage();
|
||||
$namespaces = $tpl->data['content_navigation']['namespaces'];
|
||||
if ( !$this->getUserPageHelper()->isUserPage() && $this->isTalkAllowed()
|
||||
&& !$this->getSkinOption( self::OPTIONS_TALK_AT_TOP )
|
||||
if ( !$this->getUserPageHelper()->isUserPage()
|
||||
&& $this->isTalkAllowed() && $talkAtBottom
|
||||
) {
|
||||
// FIXME [core]: This seems unnecessary..
|
||||
$subjectId = $title->getNamespaceKey( '' );
|
||||
|
|
Loading…
Reference in a new issue