r98958 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r98957‎ | r98958 | r98959 >
Date:00:28, 5 October 2011
Author:jeroendedauw
Status:deferred
Tags:
Comment:
work on contest judge page
Modified paths:
  • /trunk/extensions/Contest/Contest.alias.php (modified) (history)
  • /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/SpecialContestPage.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Contest/Contest.i18n.php
@@ -143,7 +143,19 @@
144144 'contest-contestant-yes' => 'Yes',
145145 'contest-contestant-commentcount' => 'Comments',
146146 'contest-contestant-overallrating' => 'Rating',
147 - 'contest-contestant-rating' => '$1 ($2 {{PLURAL:$2|vote|votes}})'
 147+ 'contest-contestant-rating' => '$1 ($2 {{PLURAL:$2|vote|votes}})',
 148+
 149+ // Special:Contestant
 150+ 'contest-contestant-title' => 'Contestant $1 ($2)',
 151+ 'contest-contestant-header-id' => 'Contestant ID',
 152+ 'contest-contestant-header-contest' => 'Contest name',
 153+ 'contest-contestant-header-submission' => 'Submission link',
 154+ 'contest-contestant-header-country' => 'Contestant country',
 155+ 'contest-contestant-header-wmf' => 'Interested in WMF job',
 156+ 'contest-contestant-header-volunteer' => 'Interested in volunteer opportunities',
 157+ 'contest-contestant-header-rating' => 'Rating',
 158+ 'contest-contestant-header-comments' => 'Amount of comments',
 159+ 'contest-contestant-submission-url' => 'Submission',
148160 );
149161
150162 /** Message documentation (Message documentation)
Index: trunk/extensions/Contest/Contest.alias.php
@@ -17,6 +17,7 @@
1818 /** English (English) */
1919 $specialPageAliases['en'] = array(
2020 'Contest' => array( 'Contest' ),
 21+ 'Contestant' => array( 'Contestant' ),
2122 'Contests' => array( 'Contests' ),
2223 'ContestSignup' => array( 'ContestSignup' ),
2324 'ContestSubmission' => array( 'ContestSubmission' ),
Index: trunk/extensions/Contest/specials/SpecialContestPage.php
@@ -128,7 +128,7 @@
129129
130130 $links[] = Html::element(
131131 'a',
132 - array( 'href' => SpecialPage::getTitleFor( $page[0], $subPage )->getLocalURL() ),
 132+ array( 'href' => SpecialPage::getTitleFor( 'ContestSubmission', $subPage )->getLocalURL() ),
133133 wfMsgExt( $message, 'parseinline', $subPage )
134134 );
135135 }
Index: trunk/extensions/Contest/Contest.php
@@ -60,6 +60,7 @@
6161 $wgAutoloadClasses['ContestVote'] = dirname( __FILE__ ) . '/includes/ContestVote.php';
6262
6363 $wgAutoloadClasses['SpecialContest'] = dirname( __FILE__ ) . '/specials/SpecialContest.php';
 64+$wgAutoloadClasses['SpecialContestant'] = dirname( __FILE__ ) . '/specials/SpecialContestant.php';
6465 $wgAutoloadClasses['SpecialContestPage'] = dirname( __FILE__ ) . '/specials/SpecialContestPage.php';
6566 $wgAutoloadClasses['SpecialContests'] = dirname( __FILE__ ) . '/specials/SpecialContests.php';
6667 $wgAutoloadClasses['SpecialContestSignup'] = dirname( __FILE__ ) . '/specials/SpecialContestSignup.php';
@@ -69,6 +70,7 @@
7071
7172 // Special pages
7273 $wgSpecialPages['Contest'] = 'SpecialContest';
 74+$wgSpecialPages['Contestant'] = 'SpecialContestant';
7375 $wgSpecialPages['Contests'] = 'SpecialContests';
7476 $wgSpecialPages['ContestSignup'] = 'SpecialContestSignup';
7577 $wgSpecialPages['ContestSubmission'] = 'SpecialContestSubmission';
@@ -76,6 +78,7 @@
7779 $wgSpecialPages['EditContest'] = 'SpecialEditContest';
7880
7981 $wgSpecialPageGroups['Contest'] = 'other';
 82+$wgSpecialPageGroups['Contestant'] = 'other';
8083 $wgSpecialPageGroups['Contests'] = 'other';
8184 $wgSpecialPageGroups['ContestSignup'] = 'other';
8285 $wgSpecialPageGroups['ContestSubmission'] = 'other';
Index: trunk/extensions/Contest/includes/ContestantPager.php
@@ -65,6 +65,15 @@
6666
6767 public function formatValue( $name, $value ) {
6868 switch ( $name ) {
 69+ case 'contestant_id':
 70+ $value = Html::element(
 71+ 'a',
 72+ array(
 73+ 'href' => SpecialPage::getTitleFor( 'Contestant', $value )->getLocalURL()
 74+ ),
 75+ $value
 76+ );
 77+ break;
6978 case 'contestant_volunteer': case 'contestant_wmf':
7079 $value = wfMsg( 'contest-contestant-' . ( $value === '1' ? 'yes' : 'no' ) );
7180 break;

Follow-up revisions

RevisionCommit summaryAuthorDate
r98959follow up to r98958jeroendedauw00:31, 5 October 2011

Status & tagging log