Index: trunk/extensions/ArticleFeedbackv5/ArticleFeedbackv5.i18n.php |
— | — | @@ -335,6 +335,7 @@ |
336 | 336 | 'articlefeedbackv5-form-delete' => '{{Identical|Delete}}', |
337 | 337 | 'articlefeedbackv5-form-oversight' => 'Request that an oversighter review this feedback', |
338 | 338 | 'articlefeedbackv5-form-unoversight' => 'Remove request for oversight', |
| 339 | + 'articlefeedbackv5-error-loading-feedback' => 'Message displayed when there was an error loading feedback - result is a largely-blank page.', |
339 | 340 | 'articlefeedbackv5-form-header' => "* '''$1''' is the feedback ID. |
340 | 341 | * '''$2''' is the date and time at which the feedback was given.", |
341 | 342 | 'articlefeedbackv5-form1-header-found' => 'Parameters |
Index: trunk/extensions/ArticleFeedbackv5/modules/jquery.articleFeedbackv5/jquery.articleFeedbackv5.special.css |
— | — | @@ -327,6 +327,7 @@ |
328 | 328 | .sort-active { |
329 | 329 | width: 11px; |
330 | 330 | height: 1em; |
| 331 | + font-weight: bold; |
331 | 332 | } |
332 | 333 | .ascending { |
333 | 334 | /* @embed */ |
Index: trunk/extensions/ArticleFeedbackv5/modules/jquery.articleFeedbackv5/jquery.articleFeedbackv5.special.js |
— | — | @@ -85,12 +85,15 @@ |
86 | 86 | |
87 | 87 | // Process anything we found in the URL hash |
88 | 88 | // Permalinks. |
89 | | - var id = window.location.hash.match(/id=(\d+)/) |
| 89 | + var id = window.location.href.match(/(.+)\/(\d+)$/) |
90 | 90 | if( id ) { |
91 | 91 | $.articleFeedbackv5special.listControls.filter = 'id'; |
92 | | - $.articleFeedbackv5special.listControls.filterValue = id[1]; |
| 92 | + $.articleFeedbackv5special.listControls.filterValue = id[2]; |
93 | 93 | } |
94 | 94 | |
| 95 | + // Bold the default sort. |
| 96 | + $( '#articleFeedbackv5-special-sort-age' ).addClass( 'sort-active' ); |
| 97 | + |
95 | 98 | // Grab the user's activity out of the cookie |
96 | 99 | $.articleFeedbackv5special.activityCookieName += $.articleFeedbackv5special.page; |
97 | 100 | $.articleFeedbackv5special.loadActivity(); |
Index: trunk/extensions/ArticleFeedbackv5/ArticleFeedbackv5.php |
— | — | @@ -274,14 +274,14 @@ |
275 | 275 | $wgHooks['ArticleSaveComplete'][] = 'ArticleFeedbackv5Hooks::trackEditSuccess'; |
276 | 276 | |
277 | 277 | // API Registration |
278 | | -#$wgAPIListModules['articlefeedbackv5-view-ratings'] = 'ApiViewRatingsArticleFeedbackv5'; |
279 | | -#$wgAPIListModules['articlefeedbackv5-view-feedback'] = 'ApiViewFeedbackArticleFeedbackv5'; |
280 | | -#$wgAPIModules['articlefeedbackv5-flag-feedback'] = 'ApiFlagFeedbackArticleFeedbackv5'; |
| 278 | +$wgAPIListModules['articlefeedbackv5-view-ratings'] = 'ApiViewRatingsArticleFeedbackv5'; |
| 279 | +$wgAPIListModules['articlefeedbackv5-view-feedback'] = 'ApiViewFeedbackArticleFeedbackv5'; |
| 280 | +$wgAPIModules['articlefeedbackv5-flag-feedback'] = 'ApiFlagFeedbackArticleFeedbackv5'; |
281 | 281 | $wgAPIModules['articlefeedbackv5'] = 'ApiArticleFeedbackv5'; |
282 | 282 | |
283 | 283 | // Special Page |
284 | | -#$wgSpecialPages['ArticleFeedbackv5'] = 'SpecialArticleFeedbackv5'; |
285 | | -#$wgSpecialPageGroups['ArticleFeedbackv5'] = 'other'; |
| 284 | +$wgSpecialPages['ArticleFeedbackv5'] = 'SpecialArticleFeedbackv5'; |
| 285 | +$wgSpecialPageGroups['ArticleFeedbackv5'] = 'other'; |
286 | 286 | |
287 | 287 | $wgAvailableRights[] = 'aftv5-hide-feedback'; |
288 | 288 | $wgAvailableRights[] = 'aftv5-delete-feedback'; |
Index: trunk/extensions/ArticleFeedbackv5/api/ApiViewFeedbackArticleFeedbackv5.php |
— | — | @@ -463,7 +463,8 @@ |
464 | 464 | |
465 | 465 | private function renderPermalinkTimestamp( $record ) { |
466 | 466 | global $wgLang; |
467 | | - $id = $record->af_id; |
| 467 | + $id = $record->af_id; |
| 468 | + $title = $record->page_title; |
468 | 469 | |
469 | 470 | // Taken from the Moodbar extension. |
470 | 471 | $now = wfTimestamp( TS_UNIX ); |
— | — | @@ -484,11 +485,12 @@ |
485 | 486 | return Html::openElement( 'span', array( |
486 | 487 | 'class' => 'articleFeedbackv5-comment-details-date' |
487 | 488 | ) ) |
488 | | - . Html::element( 'a', array( |
489 | | - 'class' => 'articleFeedbackv5-permalink', |
490 | | - 'id' => "articleFeedbackv5-permalink-$id", |
491 | | - 'href' => "#id=$id" |
492 | | - ), $date ) |
| 489 | + . Linker::link( |
| 490 | + Title::newFromText( |
| 491 | + "Special:ArticleFeedbackv5/$title/$id" |
| 492 | + ), |
| 493 | + $date |
| 494 | + ) |
493 | 495 | . Html::closeElement( 'span' ); |
494 | 496 | } |
495 | 497 | |
— | — | @@ -624,14 +626,12 @@ |
625 | 627 | |
626 | 628 | private function feedbackHead( $message, $class, $record, $extra = '' ) { |
627 | 629 | $name = htmlspecialchars( $record->user_name ); |
628 | | - $link = $record->af_user_id ? "User:$name" : "Special:Contributions/$name"; |
| 630 | + $link = !$record->af_user_ip ? "User:$name" : "Special:Contributions/$name"; |
629 | 631 | $gender = $name; |
630 | 632 | |
631 | | - return Html::openElement( 'h3', array( |
632 | | - 'class' => $class |
633 | | - ) ) |
| 633 | + return Html::openElement( 'h3', array( 'class' => $class) ) |
| 634 | + . Html::element( 'span', array( 'class' => 'icon' ) ) |
634 | 635 | . Linker::link( Title::newFromText( $link ), $name ) |
635 | | - . Html::element( 'span', array( 'class' => 'icon' ) ) |
636 | 636 | . Html::element( 'span', |
637 | 637 | array( 'class' => 'result' ), |
638 | 638 | wfMessage( $message, $gender, $extra )->text() |
Index: trunk/extensions/ArticleFeedbackv5/SpecialArticleFeedbackv5.php |
— | — | @@ -59,6 +59,11 @@ |
60 | 60 | public function execute( $param ) { |
61 | 61 | global $wgArticleFeedbackv5DashboardCategory; |
62 | 62 | $out = $this->getOutput(); |
| 63 | + |
| 64 | + if( preg_match('/^(.+)\/(\d+)$/', $param, $m ) ) { |
| 65 | + $param = $m[1]; |
| 66 | + } |
| 67 | + |
63 | 68 | $title = Title::newFromText( $param ); |
64 | 69 | |
65 | 70 | // Page does not exist. |
Index: trunk/extensions/ArticleFeedbackv5/ArticleFeedbackv5.hooks.php |
— | — | @@ -174,7 +174,8 @@ |
175 | 175 | 'articlefeedbackv5-form-undelete', |
176 | 176 | 'articlefeedbackv5-hidden', |
177 | 177 | 'articlefeedbackv5-comment-more', |
178 | | - 'articlefeedbackv5-comment-less' |
| 178 | + 'articlefeedbackv5-comment-less', |
| 179 | + 'articlefeedbackv5-error-loading-feedback' |
179 | 180 | ), |
180 | 181 | 'dependencies' => array( |
181 | 182 | 'mediawiki.util', |