Index: trunk/extensions/Reviews/includes/Review.php |
— | — | @@ -403,8 +403,26 @@ |
404 | 404 | |
405 | 405 | $html .= $this->getStateControl( $user, false ); |
406 | 406 | |
407 | | - $html .= " ( View details | Edit )"; |
| 407 | + $controlLinks = array(); |
408 | 408 | |
| 409 | + if ( $user->isAllowed( 'reviewsadmin' ) ) { |
| 410 | + $controlLinks[] = Linker::linkKnown( |
| 411 | + SpecialPage::getTitleFor( 'Reviews', $this->getId() ), |
| 412 | + wfMsg( 'reviews-review-details' ) |
| 413 | + ); |
| 414 | + } |
| 415 | + |
| 416 | + if ( $user->getId() === $this->getField( 'user_id' ) ) { |
| 417 | + $controlLinks[] = Linker::linkKnown( |
| 418 | + SpecialPage::getTitleFor( 'MyReviews', $this->getId() ), |
| 419 | + wfMsg( 'reviews-review-edit' ) |
| 420 | + ); |
| 421 | + } |
| 422 | + |
| 423 | + if ( count( $controlLinks ) > 0 ) { |
| 424 | + $html .= '(' . $lang->pipeList( $controlLinks ) . ')'; |
| 425 | + } |
| 426 | + |
409 | 427 | $html .= '</td></tr>'; |
410 | 428 | |
411 | 429 | $html .= '</table>'; |
Index: trunk/extensions/Reviews/Reviews.i18n.php |
— | — | @@ -111,6 +111,9 @@ |
112 | 112 | // Review display |
113 | 113 | 'reviews-posted-by' => 'By $1', |
114 | 114 | 'reviews-posted-on' => 'Added $1', |
| 115 | + 'reviews-review-details' => 'View details', |
| 116 | + 'reviews-review-edit' => 'Edit', |
| 117 | + 'reviews-review-delete' => 'Delete', |
115 | 118 | ); |
116 | 119 | |
117 | 120 | /** Message documentation (Message documentation) |