From: jdlrobson Date: Mon, 5 Aug 2019 19:08:57 +0000 (-0700) Subject: Improve log entries display in change lists X-Git-Tag: 1.34.0-rc.0~781^2 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/membres/fiche.php?a=commitdiff_plain;h=2336c514881794544230e58e2a47182302edf2ae;p=lhc%2Fweb%2Fwiklou.git Improve log entries display in change lists Log entries are wrapped with parenthesis - not hardcoded into HTML causing stray brackets in Minerva where this element is floated. Has no impact on other skins In addition to this the entire log entry item is wrapped in a new span mw-changeslist-log-entry to ensure the text is recognised as a whole entity - on Minerva floats were leading to the action and the action object being separated (e.g. uploaded and "File:Name were separated Bug: T229360 Change-Id: Idae997b15f68bb0dfcaa857f7458ba3497233d41 --- diff --git a/includes/changes/ChangesList.php b/includes/changes/ChangesList.php index 31b44430e8..5ced294bd2 100644 --- a/includes/changes/ChangesList.php +++ b/includes/changes/ChangesList.php @@ -451,9 +451,9 @@ class ChangesList extends ContextSource { public function insertLog( &$s, $title, $logtype ) { $page = new LogPage( $logtype ); $logname = $page->getName()->setContext( $this->getContext() )->text(); - $s .= $this->msg( 'parentheses' )->rawParams( - $this->linkRenderer->makeKnownLink( $title, $logname ) - )->escaped(); + $s .= Html::rawElement( 'span', [ + 'class' => 'mw-changeslist-links' + ], $this->linkRenderer->makeKnownLink( $title, $logname ) ); } /** @@ -605,7 +605,9 @@ class ChangesList extends ContextSource { $formatter->setShowUserToolLinks( true ); $mark = $this->getLanguage()->getDirMark(); - return $formatter->getActionText() . " $mark" . $formatter->getComment(); + return Html::openElement( 'span', [ 'class' => 'mw-changeslist-log-entry' ] ) + . $formatter->getActionText() . " $mark" . $formatter->getComment() + . Html::closeElement( 'span' ); } /**