Sbisson has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/327006 )
Change subject: [WIP] Add classes to RC lines so they can be highlighted ...................................................................... [WIP] Add classes to RC lines so they can be highlighted Bug: T152797 Change-Id: Ifc274c3152f40852774dafab29982d1b2def0a34 --- M includes/changes/ChangesList.php 1 file changed, 12 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/06/327006/1 diff --git a/includes/changes/ChangesList.php b/includes/changes/ChangesList.php index 77038ed..c36a23f 100644 --- a/includes/changes/ChangesList.php +++ b/includes/changes/ChangesList.php @@ -158,19 +158,27 @@ protected function getHTMLClasses( $rc, $watched ) { $classes = []; $logType = $rc->mAttribs['rc_log_type']; + $classPrefix = 'mw-changeslist-'; if ( $logType ) { - $classes[] = Sanitizer::escapeClass( 'mw-changeslist-log-' . $logType ); + $classes[] = Sanitizer::escapeClass( $classPrefix . 'log-' . $logType ); } else { - $classes[] = Sanitizer::escapeClass( 'mw-changeslist-ns' . + $classes[] = Sanitizer::escapeClass( $classPrefix . 'ns' . $rc->mAttribs['rc_namespace'] . '-' . $rc->mAttribs['rc_title'] ); } // Indicate watched status on the line to allow for more // comprehensive styling. $classes[] = $watched && $rc->mAttribs['rc_timestamp'] >= $watched - ? 'mw-changeslist-line-watched' - : 'mw-changeslist-line-not-watched'; + ? $classPrefix . 'line-watched' + : $classPrefix . 'line-not-watched'; + + $classes[] = $classPrefix . ( $rc->getAttribute( 'rc_bot' ) ? 'bot' : 'human' ); + $classes[] = $classPrefix . ( $rc->getAttribute( 'rc_user' ) ? 'liu' : 'anon' ); + $classes[] = $classPrefix . ( $rc->getAttribute( 'rc_minor' ) ? 'minor' : 'major' ); + $classes[] = $classPrefix . ( $rc->getAttribute( 'rc_patrolled' ) ? 'patrolled' : 'unpatrolled' ); + $classes[] = $classPrefix . ( $this->getUser()->equals( $rc->getPerformer() ) ? 'self' : 'others' ); + $classes[] = $classPrefix . 'src-' . str_replace( '.', '-', $rc->getAttribute( 'rc_source' ) ); return $classes; } -- To view, visit https://gerrit.wikimedia.org/r/327006 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifc274c3152f40852774dafab29982d1b2def0a34 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Sbisson <sbis...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits