Index: trunk/extensions/Contest/Contest.i18n.php |
— | — | @@ -171,6 +171,7 @@ |
172 | 172 | 'contest-contestant-rate' => 'Rate this contestant', |
173 | 173 | 'contest-contestant-not-voted' => 'You have not voted on this participant yet.', |
174 | 174 | 'contest-contestant-voted' => 'Your current vote is $1.', |
| 175 | + 'contest-contestant-permalink' => 'Permalink', |
175 | 176 | ); |
176 | 177 | |
177 | 178 | /** Message documentation (Message documentation) |
Index: trunk/extensions/Contest/specials/SpecialContestant.php |
— | — | @@ -303,9 +303,19 @@ |
304 | 304 | protected function getCommentHTML( ContestComment $comment ) { |
305 | 305 | $user = User::newFromId( $comment->getField( 'user_id' ) ); |
306 | 306 | |
| 307 | + $htmlId = 'c' . $comment->getId(); |
| 308 | + |
307 | 309 | $html = Html::rawElement( |
308 | 310 | 'div', |
309 | 311 | array( 'class' => 'contestant-comment-meta' ), |
| 312 | + Html::element( |
| 313 | + 'a', |
| 314 | + array( |
| 315 | + 'href' => $this->getTitle( $this->subPage )->getLocalURL() . "#$htmlId", |
| 316 | + 'title' => wfMsg( 'contest-contestant-permalink' ) |
| 317 | + ), |
| 318 | + '#' |
| 319 | + ) . |
310 | 320 | wfMsgHtml( |
311 | 321 | 'contest-contestant-comment-by', |
312 | 322 | Linker::userLink( $comment->getField( 'user_id' ), $user->getName() ) . |
— | — | @@ -323,6 +333,7 @@ |
324 | 334 | 'div', |
325 | 335 | array( |
326 | 336 | 'class' => 'contestant-comment', |
| 337 | + 'id' => $htmlId |
327 | 338 | ), |
328 | 339 | $html |
329 | 340 | ); |