jenkins-bot has submitted this change and it was merged.
Change subject: Give RC/Watchlist titles the mw-title html class
......................................................................
Give RC/Watchlist titles the mw-title html class
This html class is used in coordination with a wrapper on the
<li> for the whole row to bold specific titles of interest to
the user like watchlisted titles or titles updated since last
visit.
Bug: 66876
Change-Id: Ia05adf25259f303d1dd1e47ea2336dd2b7724314
---
M includes/Formatter/AbstractFormatter.php
1 file changed, 20 insertions(+), 15 deletions(-)
Approvals:
Bsitu: Looks good to me, approved
jenkins-bot: Verified
diff --git a/includes/Formatter/AbstractFormatter.php
b/includes/Formatter/AbstractFormatter.php
index c1e5d48..daec5c7 100644
--- a/includes/Formatter/AbstractFormatter.php
+++ b/includes/Formatter/AbstractFormatter.php
@@ -279,22 +279,27 @@
* @return string HTML linking to topic & board
*/
protected function getTitleLink( array $data, FormatterRow $row,
IContextSource $ctx ) {
- if ( isset( $data['links']['topic'] ) && $row->revision
instanceof PostRevision ) {
- /** @var \Flow\Anchor $topic */
- $topic = $data['links']['topic'];
+ $ownerLink = Linker::link(
+ $row->workflow->getOwnerTitle(),
+ null,
+ array( 'class' => 'mw-title' )
+ );
- // generated link has generic link text, should be
actual topic title
- $root = $row->revision->getRootPost();
- if ( $root ) {
- $topic->setMessage( Container::get(
'templating' )->getContent( $root, 'wikitext' ) );
- }
-
- return $ctx->msg( 'flow-rc-topic-of-board' )->rawParams(
- $topic->toHtml(),
- Linker::link( $row->workflow->getOwnerTitle() )
- )->escaped();
- } else {
- return Linker::link( $row->workflow->getOwnerTitle() );
+ if ( !isset( $data['links']['topic'] ) || !$row->revision
instanceof PostRevision ) {
+ return $ownerLink;
}
+ /** @var \Flow\Anchor $topic */
+ $topic = $data['links']['topic'];
+
+ // generated link has generic link text, should be actual topic
title
+ $root = $row->revision->getRootPost();
+ if ( $root ) {
+ $topic->setMessage( Container::get( 'templating'
)->getContent( $root, 'wikitext' ) );
+ }
+
+ return $ctx->msg( 'flow-rc-topic-of-board' )->rawParams(
+ $topic->toHtml(),
+ $ownerLink
+ )->escaped();
}
}
--
To view, visit https://gerrit.wikimedia.org/r/159399
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ia05adf25259f303d1dd1e47ea2336dd2b7724314
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: EBernhardson <[email protected]>
Gerrit-Reviewer: Bsitu <[email protected]>
Gerrit-Reviewer: SG <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits