r75946 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r75945‎ | r75946 | r75947 >
Date:18:11, 3 November 2010
Author:yaron
Status:deferred
Tags:
Comment:
Added CSS classes to various user messages
Modified paths:
  • /trunk/extensions/ApprovedRevs/ApprovedRevs.hooks.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ApprovedRevs/ApprovedRevs.hooks.php
@@ -140,9 +140,14 @@
141141 return false;
142142 }
143143
 144+ ApprovedRevs::addCSS();
144145 wfLoadExtensionMessages( 'ApprovedRevs' );
145146 if ( $revisionID == $article->getLatest() ) {
146 - $text = wfMsg( 'approvedrevs-approvedandlatest' );
 147+ $text = Xml::element(
 148+ 'span',
 149+ array( 'class' => 'approvedAndLatestMsg' ),
 150+ wfMsg( 'approvedrevs-approvedandlatest' )
 151+ );
147152 } else {
148153 $text = wfMsg( 'approvedrevs-notlatest' );
149154 global $wgUser;
@@ -155,6 +160,11 @@
156161 array( 'known', 'noclasses' )
157162 );
158163 $text .= ' ' . $curRevLink;
 164+ $text = Xml::tags(
 165+ 'span',
 166+ array( 'class' => 'notLatestMsg' ),
 167+ $text
 168+ );
159169 }
160170 global $wgOut;
161171 if ( $wgOut->getSubtitle() != '' ) {
@@ -180,8 +190,9 @@
181191 $approvedRevID = ApprovedRevs::getApprovedRevID( $title );
182192 $latestRevID = $title->getLatestRevID();
183193 if ( ! empty( $approvedRevID ) && $approvedRevID != $latestRevID ) {
 194+ ApprovedRevs::addCSS();
184195 global $wgOut;
185 - $wgOut->addHTML( '<p><strong>' . wfMsg( 'approvedrevs-editwarning' ) . "</strong></p>\n" );
 196+ $wgOut->addHTML( '<p class="approvedRevsEditWarning">' . wfMsg( 'approvedrevs-editwarning' ) . "</p>\n" );
186197 }
187198 return true;
188199 }
@@ -198,6 +209,7 @@
199210 $approvedRevID = ApprovedRevs::getApprovedRevID( $wgTitle );
200211 $latestRevID = $wgTitle->getLatestRevID();
201212 if ( ! empty( $approvedRevID ) && $approvedRevID != $latestRevID ) {
 213+ ApprovedRevs::addCSS();
202214 $preFormHTML .= '<p><strong>' . wfMsg( 'approvedrevs-editwarning' ) . "</strong></p>\n";
203215 }
204216 return true;

Status & tagging log