r100399 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r100398‎ | r100399 | r100400 >
Date:00:40, 21 October 2011
Author:jeroendedauw
Status:ok
Tags:
Comment:
diplay submission url and added it to contestant pager
Modified paths:
  • /trunk/extensions/Contest/Contest.i18n.php (modified) (history)
  • /trunk/extensions/Contest/Contest.php (modified) (history)
  • /trunk/extensions/Contest/includes/ContestantPager.php (modified) (history)
  • /trunk/extensions/Contest/specials/SpecialContestant.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Contest/Contest.i18n.php
@@ -177,6 +177,7 @@
178178 'contest-contestant-commentcount' => 'Comments',
179179 'contest-contestant-overallrating' => 'Rating',
180180 'contest-contestant-rating' => '$1 ($2 {{PLURAL:$2|vote|votes}})',
 181+ 'contest-contestant-submission' => 'Submission',
181182
182183 // Special:Contestant
183184 'contest-contestant-title' => 'Contestant $1 ($2)',
@@ -290,6 +291,7 @@
291292 'contest-contestant-yes' => 'Table cell value',
292293 'contest-contestant-commentcount' => 'Table column header',
293294 'contest-contestant-overallrating' => 'Table column header',
 295+ 'contest-contestant-submission' => 'Table column header',
294296 'contest-contestant-rating' => '$1 is the avarage rating, $2 is the amount of votes',
295297 'contest-contestant-title' => 'Page title with contestant id $1 and contest name $2',
296298 'contest-contestant-header-id' => 'Table row header',
Index: trunk/extensions/Contest/specials/SpecialContestant.php
@@ -189,11 +189,11 @@
190190 $stats['submission'] = htmlspecialchars( wfMsg( 'contest-contestant-notsubmitted' ) );
191191 }
192192 else {
193 - $stats['submission'] = '<b>' . Html::element(
 193+ $stats['submission'] = Html::element(
194194 'a',
195 - array( 'href' => $contestant->getField( 'submission' ) ),
196 - wfMsg( 'contest-contestant-submission-url' )
197 - ) . '</b>';
 195+ array( 'href' => $contestant->getField( 'submission' ) ),
 196+ $contestant->getField( 'submission' )
 197+ );
198198 }
199199
200200 $countries = ContestContestant::getCountries();
Index: trunk/extensions/Contest/Contest.php
@@ -28,7 +28,7 @@
2929 die( '<b>Error:</b> Contest requires MediaWiki 1.18 or above.' );
3030 }
3131
32 -define( 'CONTEST_VERSION', '0.1' );
 32+define( 'CONTEST_VERSION', '0.2 alpha' );
3333
3434 $wgExtensionCredits['other'][] = array(
3535 'path' => __FILE__,
Index: trunk/extensions/Contest/includes/ContestantPager.php
@@ -131,6 +131,7 @@
132132 'contestant_wmf' => 'contest-contestant-wmf',
133133 'contestant_comments' => 'contest-contestant-commentcount',
134134 'contestant_rating' => 'contest-contestant-overallrating',
 135+ 'contestant_submission' => 'contest-contestant-submission',
135136 );
136137
137138 $headers = array_map( 'wfMsg', $headers );
@@ -217,13 +218,22 @@
218219 $value = htmlspecialchars( $this->getLang()->formatNum( $value ) );
219220 break;
220221 case 'contestant_rating':
221 - $value = htmlspecialchars( wfMsgExt(
 222+ $value = '<div style="white-space:nowrap;">' . htmlspecialchars( wfMsgExt(
222223 'contest-contestant-rating',
223224 'parsemag',
224225 $this->getLang()->formatNum( $value / 100 ),
225226 $this->getLang()->formatNum( $this->mCurrentRow->contestant_rating_count )
226 - ) );
 227+ ) ) . '</div>';
227228 break;
 229+ case 'contestant_submission':
 230+ $value = Html::element(
 231+ 'a',
 232+ array(
 233+ 'href' => $value
 234+ ),
 235+ $value
 236+ );
 237+ break;
228238 }
229239
230240 return $value;
@@ -240,6 +250,7 @@
241251 'contestant_comments',
242252 'contestant_rating',
243253 'contestant_rating_count',
 254+ 'contestant_submission',
244255 ),
245256 'conds' => $this->conds,
246257 );

Follow-up revisions

RevisionCommit summaryAuthorDate
r1004031.18wmf1 MFT r100399, r100402reedy01:59, 21 October 2011

Status & tagging log