Jdlrobson has uploaded a new change for review.
https://gerrit.wikimedia.org/r/79277
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/mf-common.less
M stylesheets/common/mf-common.css
5 files changed, 16 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend
refs/changes/77/79277/1
diff --git a/MobileFrontend.i18n.php b/MobileFrontend.i18n.php
index 2a6b3e4..3a3191d 100644
--- a/MobileFrontend.i18n.php
+++ b/MobileFrontend.i18n.php
@@ -281,6 +281,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',
@@ -741,6 +742,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 f3c4e50..6be7d67 100644
--- a/includes/skins/MinervaTemplate.php
+++ b/includes/skins/MinervaTemplate.php
@@ -110,6 +110,9 @@
?>
<div id="content" class="content">
<?php
+ if ( $data['subject-page'] ) {
+ echo $data['subject-page'];
+ }
echo $data[ 'bodytext' ];
$this->renderLanguages();
$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/mf-common.less b/less/common/mf-common.less
index 573f2b1..faaff89 100644
--- a/less/common/mf-common.less
+++ b/less/common/mf-common.less
@@ -211,6 +211,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/mf-common.css b/stylesheets/common/mf-common.css
index 0af8f2d..7f517a0 100644
--- a/stylesheets/common/mf-common.css
+++ b/stylesheets/common/mf-common.css
@@ -183,6 +183,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: newchange
Gerrit-Change-Id: I9c2dc94504ef0ed22cf62cdffe59192683ce3302
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits