jenkins-bot has submitted this change and it was merged.
Change subject: Bug 50952: Show a link on talk page back to subject page
......................................................................
Bug 50952: Show a link on talk page back to subject page
Change-Id: I9c2dc94504ef0ed22cf62cdffe59192683ce3302
---
M MobileFrontend.i18n.php
M includes/skins/MinervaTemplate.php
M includes/skins/SkinMobile.php
M less/common/common.less
M stylesheets/common/common.css
5 files changed, 16 insertions(+), 0 deletions(-)
Approvals:
JGonera: Looks good to me, approved
Jdlrobson: Looks good to me, approved
jenkins-bot: Verified
diff --git a/MobileFrontend.i18n.php b/MobileFrontend.i18n.php
index f31406d..f2ccb9d 100644
--- a/MobileFrontend.i18n.php
+++ b/MobileFrontend.i18n.php
@@ -283,6 +283,7 @@
'mobile-frontend-talk-explained' => 'The following conversations are
currently active',
'mobile-frontend-talk-explained-empty' => 'There are no conversations
about this page.',
'mobile-frontend-talk-overlay-header' => 'Talk',
+ 'mobile-frontend-talk-back-to-page' => 'Return to "$1" page.',
'mobile-frontend-talk-overlay-lead-header' => 'Unnamed discussion',
'mobile-frontend-talk-add-overlay-submit' => 'Add discussion',
'mobile-frontend-talk-add-overlay-subject-placeholder' => 'Topic
subject',
@@ -752,6 +753,7 @@
'mobile-frontend-talk-explained-empty' => 'Explains why the list is
empty.',
'mobile-frontend-talk-overlay-header' => 'Heading for talk overlay.
{{Identical|Talk}}',
+ 'mobile-frontend-talk-back-to-page' => 'Label for link from talk page
to subject page.',
'mobile-frontend-talk-overlay-lead-header' => 'Heading for a discussion
which has no heading (lead section of talk page)',
'mobile-frontend-talk-add-overlay-submit' => 'Label for button which
submits a new talk page topic',
'mobile-frontend-talk-add-overlay-subject-placeholder' => 'Placeholder
text to prompt user to add a talk page topic subject',
diff --git a/includes/skins/MinervaTemplate.php
b/includes/skins/MinervaTemplate.php
index ec91768..c1aa2c9 100644
--- a/includes/skins/MinervaTemplate.php
+++ b/includes/skins/MinervaTemplate.php
@@ -114,6 +114,9 @@
?>
<div id="content" class="content">
<?php
+ if ( isset( $data['subject-page'] ) ) {
+ echo $data['subject-page'];
+ }
echo $data[ 'bodytext' ];
$this->renderMetaSections();
$this->renderHistoryLink( $data );
diff --git a/includes/skins/SkinMobile.php b/includes/skins/SkinMobile.php
index 0944f95..43b8fbf 100644
--- a/includes/skins/SkinMobile.php
+++ b/includes/skins/SkinMobile.php
@@ -355,9 +355,17 @@
'data-timestamp' => $timestamp,
'href' => $historyUrl,
'text' => $lastModified,
+ 'class' => 'sibling-page',
);
$tpl->set( 'historyLink', $historyLink );
}
+ if ( $title->isTalkPage() ) {
+ $tpl->set( 'subject-page', Linker::link(
+ $title->getSubjectPage(),
+ wfMessage( 'mobile-frontend-talk-back-to-page',
$title->getText() ),
+ array( 'class' => 'sibling-page' )
+ ) );
+ }
}
/**
diff --git a/less/common/common.less b/less/common/common.less
index 9817368..7912d68 100644
--- a/less/common/common.less
+++ b/less/common/common.less
@@ -221,6 +221,8 @@
float: left;
}
+.sibling-page,
+// FIXME: Remove styling on id in 1 month
#mw-mf-last-modified {
display: block;
font-size: .9em;
diff --git a/stylesheets/common/common.css b/stylesheets/common/common.css
index 84f038a..7a8afd7 100644
--- a/stylesheets/common/common.css
+++ b/stylesheets/common/common.css
@@ -191,6 +191,7 @@
table.floatright {
float: left;
}
+.sibling-page,
#mw-mf-last-modified {
display: block;
font-size: .9em;
--
To view, visit https://gerrit.wikimedia.org/r/79277
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I9c2dc94504ef0ed22cf62cdffe59192683ce3302
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson <[email protected]>
Gerrit-Reviewer: JGonera <[email protected]>
Gerrit-Reviewer: Jdlrobson <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits