Index: trunk/extensions/ArticleFeedbackv5/ArticleFeedbackv5.i18n.php |
— | — | @@ -89,6 +89,7 @@ |
90 | 90 | 'articlefeedbackv5-form-oversight' => 'Request oversight', |
91 | 91 | 'articlefeedbackv5-form-unoversight' => 'Unmark for oversight', |
92 | 92 | 'articlefeedbackv5-form-undelete' => 'Un-oversight', |
| 93 | + 'articlefeedbackv5-form-decline' => 'Decline Oversight', |
93 | 94 | 'articlefeedbackv5-form-header' => 'Feedback #$1, at $2', |
94 | 95 | 'articlefeedbackv5-form1-header-found' => '{{GENDER:$1|$2 found what they were looking for}}', |
95 | 96 | 'articlefeedbackv5-form1-header-not-found' => '{{GENDER:$1|$2 did not find what they were looking for}}', |
Index: trunk/extensions/ArticleFeedbackv5/api/ApiViewFeedbackArticleFeedbackv5.php |
— | — | @@ -413,51 +413,65 @@ |
414 | 414 | if ( $can_hide ) { |
415 | 415 | if ( $record[0]->af_is_hidden ) { |
416 | 416 | $msg = 'unhide'; |
| 417 | + $class = 'show'; |
417 | 418 | } else { |
418 | 419 | $msg = 'hide'; |
| 420 | + $class = 'hide'; |
419 | 421 | } |
420 | 422 | $tools .= Html::rawElement( 'li', array(), Html::element( 'a', array( |
421 | | - 'id' => "articleFeedbackv5-hide-link-$id", |
422 | | - 'class' => "articleFeedbackv5-hide-link" |
| 423 | + 'id' => "articleFeedbackv5-$class-link-$id", |
| 424 | + 'class' => "articleFeedbackv5-$class-link", |
| 425 | + 'href' => '#', |
423 | 426 | ), wfMessage( "articlefeedbackv5-form-" . $msg )->text() ) ); |
424 | 427 | } |
425 | 428 | |
426 | | - if ( $can_delete ) { |
427 | | - if ( $record[0]->af_is_deleted > 0 ) { |
428 | | - $msg = 'undelete'; |
| 429 | + // !can delete == request oversight |
| 430 | + if ( $can_hide && !$can_delete) { |
| 431 | + if ( $record[0]->af_needs_oversight ) { |
| 432 | + $msg = 'unoversight'; |
| 433 | + $class = 'unrequestoversight'; |
429 | 434 | } else { |
430 | | - $msg = 'delete'; |
| 435 | + $msg = 'oversight'; |
| 436 | + $class = 'requestoversight'; |
431 | 437 | } |
432 | 438 | $tools .= Html::rawElement( 'li', array(), Html::element( 'a', array( |
433 | | - 'id' => "articleFeedbackv5-delete-link-$id", |
434 | | - 'class' => "articleFeedbackv5-delete-link" |
| 439 | + 'id' => "articleFeedbackv5-$class-link-$id", |
| 440 | + 'class' => "articleFeedbackv5-$class-link", |
| 441 | + 'href' => '#', |
435 | 442 | ), wfMessage( "articlefeedbackv5-form-" . $msg )->text() ) ); |
436 | 443 | } |
437 | 444 | |
| 445 | + // can delete == do oversight |
| 446 | + if ( $can_delete ) { |
438 | 447 | |
439 | | - $link = null; |
440 | | - if ( $record[0]->af_needs_oversight ) { |
441 | | - if ( $can_delete ) { |
442 | | - $link = 'unoversight'; |
| 448 | + // if we have oversight requested, add "decline oversight" link |
| 449 | + if ( $record[0]->af_needs_oversight ) { |
| 450 | + $tools .= Html::rawElement( 'li', array(), Html::element( 'a', array( |
| 451 | + 'id' => "articleFeedbackv5-declineoversight-link-$id", |
| 452 | + 'class' => "articleFeedbackv5-declineoversight-link", |
| 453 | + 'href' => '#', |
| 454 | + ), wfMessage( "articlefeedbackv5-form-decline")->text() ) ); |
| 455 | + } |
| 456 | + |
| 457 | + if ( $record[0]->af_is_deleted > 0 ) { |
| 458 | + $msg = 'undelete'; |
| 459 | + $class = 'unoversight'; |
443 | 460 | } else { |
444 | | - $link = 'oversighted'; |
| 461 | + $msg = 'delete'; |
| 462 | + $class = 'oversight'; |
445 | 463 | } |
446 | | - } elseif ( $can_hide ) { |
447 | | - # flag for oversight |
448 | | - $link = 'oversight'; |
| 464 | + $tools .= Html::rawElement( 'li', array(), Html::element( 'a', array( |
| 465 | + 'id' => "articleFeedbackv5-$class-link-$id", |
| 466 | + 'class' => "articleFeedbackv5-$class-link", |
| 467 | + 'href' => '#', |
| 468 | + ), wfMessage( "articlefeedbackv5-form-" . $msg )->text() ) ); |
449 | 469 | } |
450 | 470 | |
451 | | - if ( $link ) { |
452 | | - $tools .= Html::rawElement( 'li', array(), Html::element( 'a', array( |
453 | | - 'id' => "articleFeedbackv5-$link-link-$id", |
454 | | - 'class' => "articleFeedbackv5-$link-link" |
455 | | - ), wfMessage( "articlefeedbackv5-form-$link", $record[0]->af_is_deleted )->text() ) ); |
456 | | - } |
457 | | - |
458 | 471 | // view activity link |
459 | 472 | $tools .= Html::rawElement( 'li', array(), Html::element( 'a', array( |
460 | 473 | 'id' => "articleFeedbackv5-activity-link-$id", |
461 | | - 'class' => "articleFeedbackv5-activity-link" |
| 474 | + 'class' => "articleFeedbackv5-activity-link", |
| 475 | + 'href' => '#', |
462 | 476 | ), wfMessage( "articlefeedbackv5-viewactivity" )->text() ) ); |
463 | 477 | |
464 | 478 | $tools .= Html::closeElement( 'ul' ) |