jenkins-bot has submitted this change and it was merged. Change subject: Revert "Hygiene: Generate content area via mustache template" ......................................................................
Revert "Hygiene: Generate content area via mustache template" Not sure why this would be causing the problem but given the problems we have had so far with lightncandy i think it is in our best interests to revert this change and see if it fixes the problem and then think more carefully. This reverts commit a5acfa235875ee87d5ae958d75c9d821ffbce7e3. Bug: T102558 Change-Id: I1bf252ffa5ac3219aa86c219c86c660f8094d338 --- M includes/skins/MinervaTemplate.php M includes/skins/SkinMinerva.php D includes/skins/content.mustache 3 files changed, 25 insertions(+), 21 deletions(-) Approvals: Jdlrobson: Looks good to me, approved Bmansurov: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/skins/MinervaTemplate.php b/includes/skins/MinervaTemplate.php index 21b70ca..2273804 100644 --- a/includes/skins/MinervaTemplate.php +++ b/includes/skins/MinervaTemplate.php @@ -245,12 +245,30 @@ * @param array $data Data used to build the page */ protected function renderContent( $data ) { - $templateParser = new TemplateParser( __DIR__ ); - // FIXME: HTML generation of these should be done in the template itself. - $data['_secondaryActions'] = $this->getSecondaryActionsHtml(); - $data['_postContent'] = $this->getPostContentHtml( $data ); - $data['_historyLinkBottom'] = $this->getHistoryLinkBottomHtml( $data ); - echo $templateParser->processTemplate( 'content', $data ); + if ( !$data[ 'unstyledContent' ] ) { + // Add a mw-content-ltr/rtl class to be able to style based on text direction + $langClass = 'mw-content-' . $data['pageDir']; + echo Html::openElement( 'div', array( + 'id' => 'content', + 'class' => 'content ' . $langClass, + 'lang' => $data['pageLang'], + 'dir' => $data['pageDir'], + ) ); + ?> + <?php + echo $data[ 'bodytext' ]; + if ( isset( $data['subject-page'] ) ) { + echo $data['subject-page']; + } + echo $this->getPostContentHtml( $data ); + echo $this->getSecondaryActionsHtml(); + echo $this->getHistoryLinkBottomHtml( $data ); + ?> + </div> + <?php + } else { + echo $data[ 'bodytext' ]; + } } /** diff --git a/includes/skins/SkinMinerva.php b/includes/skins/SkinMinerva.php index 231d42f..160251d 100644 --- a/includes/skins/SkinMinerva.php +++ b/includes/skins/SkinMinerva.php @@ -128,7 +128,7 @@ default: // generic (all other NS) $msg = 'mobile-frontend-talk-back-to-page'; } - $tpl->set( 'returnLink', Linker::link( + $tpl->set( 'subject-page', Linker::link( $title->getSubjectPage(), wfMessage( $msg, $title->getText() ), array( 'class' => 'return-link' ) diff --git a/includes/skins/content.mustache b/includes/skins/content.mustache deleted file mode 100644 index 09ec3ac..0000000 --- a/includes/skins/content.mustache +++ /dev/null @@ -1,14 +0,0 @@ -{{^unstyledContent}} -{{! Add a mw-content-ltr/rtl class to be able to style based on text direction #}} -<div class="content mw-content-{{pageDir}}" id="content" - lang="{{pageLang}}" dir="{{pageDir}}"> - {{{bodytext}}} - {{{returnLink}}} - {{{_postContent}}} - {{{_secondaryActions}}} - {{{_historyLinkBottom}}} -</div> -{{/unstyledContent}} -{{#unstyledContent}} -{{{bodytext}}} -{{/unstyledContent}} -- To view, visit https://gerrit.wikimedia.org/r/218535 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1bf252ffa5ac3219aa86c219c86c660f8094d338 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Jdlrobson <jrob...@wikimedia.org> Gerrit-Reviewer: Bmansurov <bmansu...@wikimedia.org> Gerrit-Reviewer: Jdlrobson <jrob...@wikimedia.org> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits