http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97896

Revision: 97896
Author:   aaron
Date:     2011-09-23 08:07:28 +0000 (Fri, 23 Sep 2011)
Log Message:
-----------
Moved down 'Templates/files updated' clutter on review form

Modified Paths:
--------------
    trunk/extensions/FlaggedRevs/presentation/FlaggedPageView.php
    trunk/extensions/FlaggedRevs/presentation/RevisionReviewFormUI.php

Modified: trunk/extensions/FlaggedRevs/presentation/FlaggedPageView.php
===================================================================
--- trunk/extensions/FlaggedRevs/presentation/FlaggedPageView.php       
2011-09-23 07:48:30 UTC (rev 97895)
+++ trunk/extensions/FlaggedRevs/presentation/FlaggedPageView.php       
2011-09-23 08:07:28 UTC (rev 97896)
@@ -13,6 +13,7 @@
        protected $isMultiPageDiff = false;
        protected $reviewNotice = '';
        protected $diffNoticeBox = '';
+       protected $diffIncChangeBox = '';
        protected $reviewFormRev = false;
 
        protected $loaded = false;
@@ -1094,6 +1095,7 @@
                        }
                        # Review notice box goes in top of form
                        $form->setTopNotice( $this->diffNoticeBox );
+                       $form->setBottomNotice( $this->diffIncChangeBox );
 
                        # Set the file version we are viewing (for File: pages)
                        $form->setFileVersion( $this->out->getFileVersion() );
@@ -1387,7 +1389,7 @@
                        && $this->isDiffFromStable
                        && !$this->article->stableVersionIsSynced() ) // 
pending changes
                {
-                       $changeDiv = '';
+                       $changeText = '';
                        $this->reviewFormRev = $newRev;
                        $changeList = array();
                        # Page not synced only due to includes?
@@ -1413,7 +1415,6 @@
                        }
                        # If there are pending revs or templates/files changes, 
notify the user...
                        if ( $this->article->revsArePending() || count( 
$changeList ) ) {
-                               $changeDiv = '';
                                # If the user can review then prompt them to 
review them...
                                if ( $wgUser->isAllowed( 'review' ) ) {
                                        // Reviewer just edited...
@@ -1433,22 +1434,23 @@
                                        } else {
                                                $msg = 'revreview-update'; // 
generic "please review" notice...
                                        }
-                                       $changeDiv .= wfMsgExt( $msg, 'parse' );
+                                       $this->diffNoticeBox = wfMsgExt( $msg, 
'parse' ); // add as part of form
                                }
                                # Add include change list...
                                if ( count( $changeList ) ) { // just inclusion 
changes
-                                       $changeDiv .= "<p>" .
+                                       $changeText .= "<p>" .
                                                wfMsgExt( 
'revreview-update-includes', 'parseinline' ) .
                                                '&#160;' . implode( ', ', 
$changeList ) . "</p>\n";
                                }
                        }
-                       if ( $changeDiv != '' ) {
+                       # template/file change list
+                       if ( $changeText != '' ) {
                                if ( $wgUser->isAllowed( 'review' ) ) {
-                                       $this->diffNoticeBox = $changeDiv; // 
add as part of form
+                                       $this->diffIncChangeBox = 
"<p>$changeText</p>";
                                } else {
                                        $css = 'flaggedrevs_diffnotice 
plainlinks';
                                        $this->out->addHTML(
-                                               "<div id='mw-fr-difftostable' 
class='$css'>$changeDiv</div>\n"
+                                               "<div id='mw-fr-difftostable' 
class='$css'>$changeText</div>\n"
                                        );
                                }
                        }

Modified: trunk/extensions/FlaggedRevs/presentation/RevisionReviewFormUI.php
===================================================================
--- trunk/extensions/FlaggedRevs/presentation/RevisionReviewFormUI.php  
2011-09-23 07:48:30 UTC (rev 97895)
+++ trunk/extensions/FlaggedRevs/presentation/RevisionReviewFormUI.php  
2011-09-23 08:07:28 UTC (rev 97896)
@@ -8,6 +8,7 @@
        protected $user, $article, $rev;
        protected $refRev = null;
        protected $topNotice = '';
+       protected $bottomNotice = '';
        protected $fileVersion = null;
        protected $templateIDs = null;
        protected $imageSHA1Keys = null;
@@ -36,13 +37,21 @@
 
        /*
         * Add on a notice inside the review box at the top
-        * @param string $topNotice Text to
+        * @param string $notice HTML to show
         */
-       public function setTopNotice( $topNotice ) {
-               $this->topNotice = (string)$topNotice;
+       public function setTopNotice( $notice ) {
+               $this->topNotice = (string)$notice;
        }
 
        /*
+        * Add on a notice inside the review box at the top
+        * @param string $notice HTML to show
+        */
+       public function setBottomNotice( $notice ) {
+               $this->bottomNotice = (string)$notice;
+       }
+
+       /*
         * Set the file version parameters of what the user is viewing
         * @param Array|null $version ('time' => MW timestamp, 'sha1' => sha1)
         */
@@ -215,6 +224,9 @@
                }
                $form .= Xml::closeElement( 'div' ) . "\n";
 
+               # Show explanatory text
+               $form .= $this->bottomNotice;
+
                # Hidden params
                $form .= Html::hidden( 'title', $reviewTitle->getPrefixedText() 
) . "\n";
                $form .= Html::hidden( 'target', 
$article->getTitle()->getPrefixedDBKey() ) . "\n";


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to