r37931 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r37930‎ | r37931 | r37932 >
Date:02:48, 23 July 2008
Author:aaron
Status:old
Tags:
Comment:
UI tweaks
Modified paths:
  • /trunk/extensions/FlaggedRevs/language/RatingHistory.i18n.php (modified) (history)
  • /trunk/extensions/FlaggedRevs/specialpages/RatingHistory_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/language/RatingHistory.i18n.php
@@ -8,12 +8,17 @@
99 $messages = array();
1010
1111 $messages['en'] = array(
12 - 'ratinghistory' => 'Page rating history',
13 - 'ratinghistory-text' => 'This page displays article rating data for [[:$1|$1]].',
14 - 'ratinghistory-leg' => 'Rating history data',
15 - 'ratinghistory-tab' => 'rating',
16 - 'ratinghistory-period' => 'Time period:',
17 - 'ratinghistory-month' => 'last month',
18 - 'ratinghistory-year' => 'last year',
19 - 'ratinghistory-3years' => 'last 3 years'
 12+ 'ratinghistory' => 'Page rating history',
 13+ 'ratinghistory-text' => '\'\'\'This page displays article rating data for [[:$1|$1]].\'\'\'',
 14+ 'ratinghistory-leg' => 'Rating history data',
 15+ 'ratinghistory-tab' => 'rating',
 16+ 'ratinghistory-period' => 'Time period:',
 17+ 'ratinghistory-month' => 'last month',
 18+ 'ratinghistory-year' => 'last year',
 19+ 'ratinghistory-3years' => 'last 3 years',
 20+ 'ratinghistory-legend' => 'The daily average <font color="blue">\'\'(blue)\'\'</font> and selected interval
 21+ average <font color="green">\'\'(green)\'\'</font> rating will be graphed below, by date. The number of reviews is shown in the
 22+ upper right-hand corner of the graphs; higher values tend to indicated better sample data. The rating values are to be interpreted as as follows:
 23+
 24+\'\'\'[0]\'\'\' - Poor; \'\'\'[1]\'\'\' - Low; \'\'\'[2]\'\'\' - Fair; \'\'\'[3]\'\'\' - High; \'\'\'[4]\'\'\' - Excellent;'
2025 );
Index: trunk/extensions/FlaggedRevs/specialpages/RatingHistory_body.php
@@ -51,6 +51,7 @@
5252 protected function showHeader() {
5353 global $wgOut;
5454 $wgOut->addWikiText( wfMsg('ratinghistory-text',$this->page->getPrefixedText()) );
 55+ $wgOut->addWikiText( wfMsg('ratinghistory-legend') );
5556 }
5657
5758 protected function showForm() {
@@ -61,14 +62,6 @@
6263 $form .= Xml::hidden( 'target', $this->page->getPrefixedDBKey() );
6364 $form .= $this->getPeriodMenu( $this->period );
6465 $form .= " ".Xml::submitButton( wfMsg( 'go' ) );
65 - // Show legend
66 - $form .= wfMsgExt('ratinghistory-ave',array('parse'));
67 - $form .= Xml::openElement( 'div', array('class' => 'reader_feedback_legend') );
68 - for( $i=0; $i <= 4; $i++) {
69 - $form .= "<b>[$i]</b> - " . wfMsgHtml( "readerfeedback-level-$i" );
70 - $form .= "&nbsp;&nbsp;&nbsp;";
71 - }
72 - $form .= Xml::closeElement( 'div' );
7366 $form .= "</fieldset></form>\n";
7467 $wgOut->addHTML( $form );
7568 }
@@ -158,7 +151,7 @@
159152 # Fill in days with no votes to keep spacing even
160153 if( $day > ($lastDay + 1) ) {
161154 for( $i=($lastDay + 1); $i < $day; $i++ ) {
162 - $data[] = array("{$month}/{$i}",'','');
 155+ $data[] = array("|",'','');
163156 }
164157 }
165158 $data[] = array("{$month}/{$day}",$dayAve,$cumAve);
@@ -170,7 +163,9 @@
171164 $plot->SetXTickLabelPos('none');
172165 $plot->SetXTickPos('none');
173166 $plot->SetYTickIncrement( .5 );
174 - $plot->SetPlotAreaWorld( 0, 0, null, 4.5 );
 167+ $plot->SetPlotAreaWorld( 0, 0, null, 4 );
 168+ // Show total number of votes
 169+ $plot->SetLegend( array("#{$totalCount}") );
175170 // Draw it!
176171 $plot->DrawGraph();
177172 return true;

Status & tagging log