Index: trunk/extensions/FlaggedRevs/presentation/FlaggedPageView.php |
— | — | @@ -13,6 +13,7 @@ |
14 | 14 | protected $isMultiPageDiff = false; |
15 | 15 | protected $reviewNotice = ''; |
16 | 16 | protected $diffNoticeBox = ''; |
| 17 | + protected $diffIncChangeBox = ''; |
17 | 18 | protected $reviewFormRev = false; |
18 | 19 | |
19 | 20 | protected $loaded = false; |
— | — | @@ -1094,6 +1095,7 @@ |
1095 | 1096 | } |
1096 | 1097 | # Review notice box goes in top of form |
1097 | 1098 | $form->setTopNotice( $this->diffNoticeBox ); |
| 1099 | + $form->setBottomNotice( $this->diffIncChangeBox ); |
1098 | 1100 | |
1099 | 1101 | # Set the file version we are viewing (for File: pages) |
1100 | 1102 | $form->setFileVersion( $this->out->getFileVersion() ); |
— | — | @@ -1387,7 +1389,7 @@ |
1388 | 1390 | && $this->isDiffFromStable |
1389 | 1391 | && !$this->article->stableVersionIsSynced() ) // pending changes |
1390 | 1392 | { |
1391 | | - $changeDiv = ''; |
| 1393 | + $changeText = ''; |
1392 | 1394 | $this->reviewFormRev = $newRev; |
1393 | 1395 | $changeList = array(); |
1394 | 1396 | # Page not synced only due to includes? |
— | — | @@ -1413,7 +1415,6 @@ |
1414 | 1416 | } |
1415 | 1417 | # If there are pending revs or templates/files changes, notify the user... |
1416 | 1418 | if ( $this->article->revsArePending() || count( $changeList ) ) { |
1417 | | - $changeDiv = ''; |
1418 | 1419 | # If the user can review then prompt them to review them... |
1419 | 1420 | if ( $wgUser->isAllowed( 'review' ) ) { |
1420 | 1421 | // Reviewer just edited... |
— | — | @@ -1433,22 +1434,23 @@ |
1434 | 1435 | } else { |
1435 | 1436 | $msg = 'revreview-update'; // generic "please review" notice... |
1436 | 1437 | } |
1437 | | - $changeDiv .= wfMsgExt( $msg, 'parse' ); |
| 1438 | + $this->diffNoticeBox = wfMsgExt( $msg, 'parse' ); // add as part of form |
1438 | 1439 | } |
1439 | 1440 | # Add include change list... |
1440 | 1441 | if ( count( $changeList ) ) { // just inclusion changes |
1441 | | - $changeDiv .= "<p>" . |
| 1442 | + $changeText .= "<p>" . |
1442 | 1443 | wfMsgExt( 'revreview-update-includes', 'parseinline' ) . |
1443 | 1444 | ' ' . implode( ', ', $changeList ) . "</p>\n"; |
1444 | 1445 | } |
1445 | 1446 | } |
1446 | | - if ( $changeDiv != '' ) { |
| 1447 | + # template/file change list |
| 1448 | + if ( $changeText != '' ) { |
1447 | 1449 | if ( $wgUser->isAllowed( 'review' ) ) { |
1448 | | - $this->diffNoticeBox = $changeDiv; // add as part of form |
| 1450 | + $this->diffIncChangeBox = "<p>$changeText</p>"; |
1449 | 1451 | } else { |
1450 | 1452 | $css = 'flaggedrevs_diffnotice plainlinks'; |
1451 | 1453 | $this->out->addHTML( |
1452 | | - "<div id='mw-fr-difftostable' class='$css'>$changeDiv</div>\n" |
| 1454 | + "<div id='mw-fr-difftostable' class='$css'>$changeText</div>\n" |
1453 | 1455 | ); |
1454 | 1456 | } |
1455 | 1457 | } |
Index: trunk/extensions/FlaggedRevs/presentation/RevisionReviewFormUI.php |
— | — | @@ -8,6 +8,7 @@ |
9 | 9 | protected $user, $article, $rev; |
10 | 10 | protected $refRev = null; |
11 | 11 | protected $topNotice = ''; |
| 12 | + protected $bottomNotice = ''; |
12 | 13 | protected $fileVersion = null; |
13 | 14 | protected $templateIDs = null; |
14 | 15 | protected $imageSHA1Keys = null; |
— | — | @@ -36,13 +37,21 @@ |
37 | 38 | |
38 | 39 | /* |
39 | 40 | * Add on a notice inside the review box at the top |
40 | | - * @param string $topNotice Text to |
| 41 | + * @param string $notice HTML to show |
41 | 42 | */ |
42 | | - public function setTopNotice( $topNotice ) { |
43 | | - $this->topNotice = (string)$topNotice; |
| 43 | + public function setTopNotice( $notice ) { |
| 44 | + $this->topNotice = (string)$notice; |
44 | 45 | } |
45 | 46 | |
46 | 47 | /* |
| 48 | + * Add on a notice inside the review box at the top |
| 49 | + * @param string $notice HTML to show |
| 50 | + */ |
| 51 | + public function setBottomNotice( $notice ) { |
| 52 | + $this->bottomNotice = (string)$notice; |
| 53 | + } |
| 54 | + |
| 55 | + /* |
47 | 56 | * Set the file version parameters of what the user is viewing |
48 | 57 | * @param Array|null $version ('time' => MW timestamp, 'sha1' => sha1) |
49 | 58 | */ |
— | — | @@ -215,6 +224,9 @@ |
216 | 225 | } |
217 | 226 | $form .= Xml::closeElement( 'div' ) . "\n"; |
218 | 227 | |
| 228 | + # Show explanatory text |
| 229 | + $form .= $this->bottomNotice; |
| 230 | + |
219 | 231 | # Hidden params |
220 | 232 | $form .= Html::hidden( 'title', $reviewTitle->getPrefixedText() ) . "\n"; |
221 | 233 | $form .= Html::hidden( 'target', $article->getTitle()->getPrefixedDBKey() ) . "\n"; |