r109648 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r109647‎ | r109648 | r109649 >
Date:21:23, 20 January 2012
Author:gregchiasson
Status:ok
Tags:aft 
Comment:
AFT5 feedback page - bugfix for where I had an inconsistent (ie, broken) filter name (including fixing the translations), and re-work the header HTML per designers.
Modified paths:
  • /trunk/extensions/ArticleFeedbackv5/ArticleFeedbackv5.i18n.php (modified) (history)
  • /trunk/extensions/ArticleFeedbackv5/SpecialArticleFeedbackv5.php (modified) (history)
  • /trunk/extensions/ArticleFeedbackv5/api/ApiViewFeedbackArticleFeedbackv5.php (modified) (history)
  • /trunk/extensions/ArticleFeedbackv5/modules/jquery.articleFeedbackv5/jquery.articleFeedbackv5.special.css (modified) (history)

Diff [purge]

Index: trunk/extensions/ArticleFeedbackv5/ArticleFeedbackv5.i18n.php
@@ -60,7 +60,7 @@
6161 'articlefeedbackv5-special-sort-asc' => '^',
6262 'articlefeedbackv5-special-sort-desc' => 'v',
6363 'articlefeedbackv5-special-sort-age' => 'Date',
64 - 'articlefeedbackv5-special-sort-helpfulness' => 'Helpful',
 64+ 'articlefeedbackv5-special-sort-helpful' => 'Helpful',
6565 'articlefeedbackv5-special-sort-rating' => 'Rating',
6666 'articlefeedbackv5-special-sort-label-before' => 'Sort by:',
6767 'articlefeedbackv5-special-sort-label-after' => '',
@@ -2118,7 +2118,7 @@
21192119 'articlefeedbackv5-special-filter-visible' => 'Sichtbar ($1)',
21202120 'articlefeedbackv5-special-filter-invisible' => 'Versteckt ($1)',
21212121 'articlefeedbackv5-special-sort-age' => 'Datum',
2122 - 'articlefeedbackv5-special-sort-helpfulness' => 'Hilfreich',
 2122+ 'articlefeedbackv5-special-sort-helpful' => 'Hilfreich',
21232123 'articlefeedbackv5-special-sort-rating' => 'Bewertung',
21242124 'articlefeedbackv5-special-sort-label-before' => 'Sortieren nach:',
21252125 'articlefeedbackv5-special-filter-label-before' => 'Nur anzeigen:',
@@ -4277,7 +4277,7 @@
42784278 'articlefeedbackv5-special-filter-visible' => 'Visible ($1)',
42794279 'articlefeedbackv5-special-filter-invisible' => 'Agochado ($1)',
42804280 'articlefeedbackv5-special-sort-age' => 'Data',
4281 - 'articlefeedbackv5-special-sort-helpfulness' => 'Útil',
 4281+ 'articlefeedbackv5-special-sort-helpful' => 'Útil',
42824282 'articlefeedbackv5-special-sort-rating' => 'Valoración',
42834283 'articlefeedbackv5-special-sort-label-before' => 'Ordenar por:',
42844284 'articlefeedbackv5-special-filter-label-before' => 'Mostrar só:',
Index: trunk/extensions/ArticleFeedbackv5/modules/jquery.articleFeedbackv5/jquery.articleFeedbackv5.special.css
@@ -231,4 +231,4 @@
232232 /* @embed */
233233 /*background: url(images/bg-button.png) repeat-x;
234234 color: #fff;
235 -}*/
\ No newline at end of file
 235+}*/
Index: trunk/extensions/ArticleFeedbackv5/api/ApiViewFeedbackArticleFeedbackv5.php
@@ -470,7 +470,7 @@
471471 ApiBase::PARAM_REQUIRED => false,
472472 ApiBase::PARAM_ISMULTI => false,
473473 ApiBase::PARAM_TYPE => array(
474 - 'age', 'helpfulness', 'rating' )
 474+ 'age', 'helpful', 'rating' )
475475 ),
476476 'sortdirection' => array(
477477 ApiBase::PARAM_REQUIRED => false,
Index: trunk/extensions/ArticleFeedbackv5/SpecialArticleFeedbackv5.php
@@ -23,7 +23,7 @@
2424 );
2525 private $sorts = array(
2626 'age',
27 - 'helpfulness',
 27+ 'helpful',
2828 'rating'
2929 );
3030
@@ -68,34 +68,36 @@
6969
7070 if ( !$pageId ) {
7171 $out->addWikiMsg( 'articlefeedbackv5-invalid-page-id' );
72 - } else {
73 - # TODO: Fix links.
74 - $out->addHTML(
75 - Html::openElement(
76 - 'div',
77 - array( 'id' => 'articleFeedbackv5-header-links' )
78 - )
79 - . Linker::link(
80 - Title::newFromText( $param ),
81 - $this->msg( 'articlefeedbackv5-go-to-article' )->escaped()
82 - )
83 - . ' | ' .
84 - Linker::link(
85 - Title::newFromText( $param ),
86 - $this->msg( 'articlefeedbackv5-discussion-page' )->escaped()
87 - )
88 - . ' | ' .
89 - Linker::link(
90 - Title::newFromText( $param ),
91 - $this->msg( 'articlefeedbackv5-whats-this' )->escaped()
92 - )
93 - . Html::closeElement( 'div' )
94 - );
 72+ return;
9573 }
9674
 75+ # TODO: Fix links.
9776 $out->addHTML(
9877 Html::openElement(
9978 'div',
 79+ array( 'id' => 'articleFeedbackv5-header-wrap' )
 80+ )
 81+ . Html::openElement(
 82+ 'div',
 83+ array( 'id' => 'articleFeedbackv5-header-links' )
 84+ )
 85+ . Linker::link(
 86+ Title::newFromText( $param ),
 87+ $this->msg( 'articlefeedbackv5-go-to-article' )->escaped()
 88+ )
 89+ . ' | ' .
 90+ Linker::link(
 91+ Title::newFromText( $param ),
 92+ $this->msg( 'articlefeedbackv5-discussion-page' )->escaped()
 93+ )
 94+ . ' | ' .
 95+ Linker::link(
 96+ Title::newFromText( $param ),
 97+ $this->msg( 'articlefeedbackv5-whats-this' )->escaped()
 98+ )
 99+ . Html::closeElement( 'div' )
 100+ . Html::openElement(
 101+ 'div',
100102 array( 'id' => 'articleFeedbackv5-showing-count-wrap' )
101103 )
102104 . $this->msg(
@@ -113,16 +115,20 @@
114116 )
115117 . $this->msg( 'articlefeedbackv5-percent-found', $found ) # Can't escape this, need the <span> tag to parse.
116118 . Html::closeElement( 'div' )
117 - . Html::element(
118 - 'a',
119 - array(
120 - 'href' => '#',
121 - 'id' => 'articleFeedbackv5-special-add-feedback',
122 - ),
123 - $this->msg( 'articlefeedbackv5-special-add-feedback' )->text()
124 - )
125119 );
126120 }
 121+
 122+ $out->addHtml(
 123+ Html::element(
 124+ 'a',
 125+ array(
 126+ 'href' => '#',
 127+ 'id' => 'articleFeedbackv5-special-add-feedback',
 128+ ),
 129+ $this->msg( 'articlefeedbackv5-special-add-feedback' )->text()
 130+ )
 131+ . Html::closeElement( 'div' )
 132+ );
127133
128134 # if ( $rating ) {
129135 # $out->addWikiMsg( 'articlefeedbackv5-overall-rating', $rating );

Status & tagging log