Florianschmidtwelzow has uploaded a new change for review.

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

Change subject: Enable Legacy view of new messages on talk page
......................................................................

Enable Legacy view of new messages on talk page

Show new messages on talk page in MF over pre-content as simple string.

Bug: 56834
Change-Id: I147801129fef58fd107ebdab1426ea30af776070
---
M includes/skins/MinervaTemplate.php
M includes/skins/SkinMinerva.php
2 files changed, 17 insertions(+), 0 deletions(-)


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

diff --git a/includes/skins/MinervaTemplate.php 
b/includes/skins/MinervaTemplate.php
index 45de367..82906e1 100644
--- a/includes/skins/MinervaTemplate.php
+++ b/includes/skins/MinervaTemplate.php
@@ -169,6 +169,12 @@
                ?>
                <div class="pre-content">
                        <?php
+                               // FIXME: Legacy: Drop this, if Echo Extension 
is a core function
+                               if ( $data['newtalk'] ) {
+                                       ?>
+                                               <div class="usermessage"><?php 
$this->html( 'newtalk' ) ?></div>
+                                       <?php
+                               }
                                echo $preBodyText;
                                // FIXME: Temporary solution until we have 
design
                                if ( isset( $data['_old_revision_warning'] ) ) {
diff --git a/includes/skins/SkinMinerva.php b/includes/skins/SkinMinerva.php
index b7358e0..5b3ff58 100644
--- a/includes/skins/SkinMinerva.php
+++ b/includes/skins/SkinMinerva.php
@@ -76,6 +76,7 @@
                $this->prepareBanners( $tpl );
                $this->prepareSiteLinks( $tpl );
                $this->prepareWarnings( $tpl );
+               $this->prepareNewTalks( $tpl );
                $this->preparePageActions( $tpl );
                $this->prepareUserButton( $tpl );
                $this->prepareDiscoveryTools( $tpl );
@@ -624,6 +625,16 @@
                }
        }
 
+       /**
+        * Get new messages on talk page for wikis don't use Echo Extension.
+        * FIXME: Legacy: Drop this, if Echo is a core function
+        * @param BaseTemplate $tpl An instance of BaseTemplate
+        */
+       protected function prepareNewTalks( BaseTemplate $tpl ) {
+               $newtalks = $this->getNewtalks();
+               $tpl->set( 'newtalk', $newtalks );
+       }
+
        protected function preparePageActions( BaseTemplate $tpl ) {
                $title = $this->getTitle();
                // Reuse template data variable from SkinTemplate to construct 
page menu

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I147801129fef58fd107ebdab1426ea30af776070
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Florianschmidtwelzow <florian.schmidt.wel...@t-online.de>

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

Reply via email to