Index: trunk/extensions/FlaggedRevs/FlaggedRevs.php |
— | — | @@ -484,7 +484,7 @@ |
485 | 485 | $levelmarker = $level * 20 + 20; //XXX do this better |
486 | 486 | if( $prettyBox ) { |
487 | 487 | $tag .= "<tr><td><span class='fr-group'><span class='fr-text'>" . wfMsgHtml("revreview-$quality") . |
488 | | - "</span></tr><tr><td><span class='fr-marker fr_value$levelmarker'>$valuetext</span></span></td></tr>\n"; |
| 488 | + "</span></td><td><span class='fr-marker fr_value$levelmarker'>$valuetext</span></span></td></tr>\n"; |
489 | 489 | } else { |
490 | 490 | $tag .= " <span class='fr-marker-$levelmarker'><strong>" . |
491 | 491 | wfMsgHtml("revreview-$quality") . |
— | — | @@ -502,35 +502,32 @@ |
503 | 503 | * @param Row $trev, flagged revision row |
504 | 504 | * @param array $flags |
505 | 505 | * @param int $rev_since, revisions since review |
| 506 | + * @param bool $cur, are we referring to the visible revision? |
506 | 507 | * @returns string |
507 | 508 | * Generates a review box using a table using addTagRatings() |
508 | 509 | */ |
509 | | - public function prettyRatingBox( $tfrev, $flags, $revs_since, $simpleTag=false ) { |
510 | | - global $wgLang, $wgUser; |
511 | | - |
512 | | - $box = ''; |
| 510 | + public function prettyRatingBox( $tfrev, $flags, $revs_since, $cur=true ) { |
| 511 | + global $wgLang; |
513 | 512 | # Get quality level |
514 | 513 | $quality = self::isQuality( $flags ); |
515 | 514 | $pristine = self::isPristine( $flags ); |
516 | 515 | $time = $wgLang->date( wfTimestamp(TS_MW, $tfrev->fr_timestamp), true ); |
517 | | - |
518 | | - $skin = $wgUser->getSkin(); |
519 | 516 | // Some checks for which tag CSS to use |
520 | | - if( $simpleTag ) |
521 | | - $tagClass = 'flaggedrevs_box0'; |
522 | | - else if( $pristine ) |
| 517 | + if( $pristine ) |
523 | 518 | $tagClass = 'flaggedrevs_box3'; |
524 | 519 | else if( $quality ) |
525 | 520 | $tagClass = 'flaggedrevs_box2'; |
526 | 521 | else |
527 | 522 | $tagClass = 'flaggedrevs_box1'; |
528 | 523 | // Construct some tagging |
529 | | - $msg = $quality ? 'revreview-quality' : 'revreview-basic'; |
530 | | - $box = self::addTagRatings( $flags, true, "{$tagClass}a" ); |
531 | | - $box .= '<p><a id="mw-revisiontoggle" style="display:none;" href="javascript:toggleRevRatings()">' . |
532 | | - wfMsg('revreview-toggle') . '</a></p>'; |
| 524 | + $msg = $cur ? 'revreview-' : 'revreview-newest-'; |
| 525 | + $msg .= $quality ? 'quality' : 'basic'; |
| 526 | + |
| 527 | + $box = ' <a id="mw-revisiontoggle" style="display:none;" href="javascript:toggleRevRatings()">' . |
| 528 | + wfMsg('revreview-toggle') . '</a>'; |
533 | 529 | $box .= '<span id="mw-revisionratings">' . |
534 | 530 | wfMsgExt($msg, array('parseinline'), $tfrev->fr_rev_id, $time, $revs_since) . |
| 531 | + self::addTagRatings( $flags, true, "{$tagClass}a" ) . |
535 | 532 | '</span>'; |
536 | 533 | |
537 | 534 | return $box; |
— | — | @@ -1326,6 +1323,7 @@ |
1327 | 1324 | if( $this->useSimpleUI() ) { |
1328 | 1325 | $msg = $quality ? 'revreview-quick-see-quality' : 'revreview-quick-see-basic'; |
1329 | 1326 | $tag .= "<span class='fr_tab_current plainlinks'></span>" . wfMsgExt($msg,array('parseinline')); |
| 1327 | + $tag .= parent::prettyRatingBox( $tfrev, $flags, $revs_since, false ); |
1330 | 1328 | } else { |
1331 | 1329 | $msg = $quality ? 'revreview-newest-quality' : 'revreview-newest-basic'; |
1332 | 1330 | $tag .= wfMsgExt($msg, array('parseinline'), $tfrev->fr_rev_id, $time, $revs_since); |
— | — | @@ -1348,6 +1346,7 @@ |
1349 | 1347 | $css = $quality ? 'fr_tab_quality' : 'fr_tab_stable'; |
1350 | 1348 | $tag .= "<span class='$css plainlinks'></span>" . |
1351 | 1349 | wfMsgExt($msg,array('parseinline'),$tfrev->fr_rev_id,$revs_since); |
| 1350 | + $tag .= parent::prettyRatingBox( $tfrev, $flags, $revs_since ); |
1352 | 1351 | } else { |
1353 | 1352 | $msg = $quality ? 'revreview-quality' : 'revreview-basic'; |
1354 | 1353 | $tag = wfMsgExt($msg, array('parseinline'), $vis_id, $time, $revs_since); |
Index: trunk/extensions/FlaggedRevs/flaggedrevs.css |
— | — | @@ -1,6 +1,9 @@ |
2 | | -.flaggedrevs_tag1 { |
| 2 | +/* Standard UI */ |
| 3 | +.flaggedrevs_tag1, |
| 4 | +.flaggedrevs_tag2, |
| 5 | +.flaggedrevs_tag3, |
| 6 | +.flaggedrevs_notice { |
3 | 7 | border: 1px solid #aaa; |
4 | | - background-color: #f0f8ff; |
5 | 8 | padding: 3px; |
6 | 9 | font-size: 80%; |
7 | 10 | margin-left: 0px; |
— | — | @@ -9,33 +12,16 @@ |
10 | 13 | } |
11 | 14 | |
12 | 15 | .flaggedrevs_tag2 { |
13 | | - border: 1px solid #aaa; |
| 16 | + background-color: #f0f8ff; |
| 17 | +} |
| 18 | +.flaggedrevs_tag2 { |
14 | 19 | background-color: #f0fff0; |
15 | | - padding: 5px; |
16 | | - font-size: 80%; |
17 | | - margin-left: 0px; |
18 | | - margin-right: 0px; |
19 | | - text-align: center; |
20 | 20 | } |
21 | | - |
22 | 21 | .flaggedrevs_tag3 { |
23 | | - border: 1px solid #aaa; |
24 | 22 | background-color: #fffff0; |
25 | | - padding: 3px; |
26 | | - font-size: 80%; |
27 | | - margin-left: 0px; |
28 | | - margin-right: 0px; |
29 | | - text-align: center; |
30 | 23 | } |
31 | | - |
32 | 24 | .flaggedrevs_notice { |
33 | | - border: 1px solid #aaa; |
34 | 25 | background-color: #f9f9f9; |
35 | | - padding: 3px; |
36 | | - font-size: 80%; |
37 | | - margin-left: 0px; |
38 | | - margin-right: 0px; |
39 | | - text-align: center; |
40 | 26 | } |
41 | 27 | |
42 | 28 | .flaggedrevs_notes { |
— | — | @@ -48,29 +34,6 @@ |
49 | 35 | text-align: center; |
50 | 36 | } |
51 | 37 | |
52 | | -.flaggedrevs_short { |
53 | | - border: 1px solid #aaa; |
54 | | - background-color: #f9f9f9; |
55 | | - padding: 4px; |
56 | | - position: relative; |
57 | | - float: right; |
58 | | - font-size: 80%; |
59 | | - margin-left: 25px; |
60 | | - margin-right: 25px; |
61 | | - text-align: left; |
62 | | -} |
63 | | - |
64 | | -/*.fr-marker-1 span {display: none};*/ |
65 | | -.fr-marker-1 { |
66 | | - background-image: url(../FlaggedRevs/img/boxY.png); |
67 | | - background-repeat: no-repeat; |
68 | | - min-width: 16px; |
69 | | - width: 16px; |
70 | | - height: 16px; |
71 | | - min-height: 16px; |
72 | | - padding: 3px 16px 0px 20px; |
73 | | -} |
74 | | - |
75 | 38 | .fr-text-value { |
76 | 39 | min-width:100px; |
77 | 40 | width: 100px; |
— | — | @@ -108,13 +71,22 @@ |
109 | 72 | padding-bottom: 3px; |
110 | 73 | } |
111 | 74 | |
112 | | -.fr-marker-1 { |
113 | | - background-image: url(../FlaggedRevs/img/boxC.png); |
114 | | - background-repeat: no-repeat; |
115 | | - padding: 3px 16px 0px 0px; |
| 75 | +/* Short UI */ |
| 76 | +.flaggedrevs_short { |
| 77 | + border: 1px solid #aaa; |
| 78 | + background-color: #f9f9f9; |
| 79 | + padding: 4px; |
| 80 | + font-size: 80%; |
| 81 | + margin-left: 0px; |
| 82 | + margin-right: 0px; |
| 83 | + text-align: left; |
| 84 | + float: right; |
| 85 | + width: 320px; |
116 | 86 | } |
117 | 87 | |
118 | | -.fr_tab_current { |
| 88 | +.fr_tab_current, |
| 89 | +.fr_tab_stable, |
| 90 | +.fr_tab_quality { |
119 | 91 | padding: 0px; |
120 | 92 | margin: 0px; |
121 | 93 | width: 27px; |
— | — | @@ -123,35 +95,18 @@ |
124 | 96 | float: left; |
125 | 97 | top: -1px; |
126 | 98 | right: 0px; |
127 | | - background-image: url(../FlaggedRevs/img/1.png); |
128 | 99 | background-repeat: no-repeat; |
129 | 100 | background-position: 0px 0px; |
130 | 101 | } |
| 102 | + |
| 103 | +.fr_tab_current { |
| 104 | + background-image: url(../FlaggedRevs/img/1.png); |
| 105 | +} |
131 | 106 | .fr_tab_stable { |
132 | | - padding: 0px; |
133 | | - margin: 0px; |
134 | | - width: 27px; |
135 | | - height: 27px; |
136 | | - position: relative; |
137 | | - float: left; |
138 | | - top: -1px; |
139 | | - right: 0px; |
140 | 107 | background-image: url(../FlaggedRevs/img/2.png); |
141 | | - background-repeat: no-repeat; |
142 | | - background-position: 0px 0px; |
143 | 108 | } |
144 | 109 | .fr_tab_quality { |
145 | | - padding: 0px; |
146 | | - margin: 0px; |
147 | | - width: 27px; |
148 | | - height: 27px; |
149 | | - position: relative; |
150 | | - float: left; |
151 | | - top: -1px; |
152 | | - right: 0px; |
153 | 110 | background-image: url(../FlaggedRevs/img/3.png); |
154 | | - background-repeat: no-repeat; |
155 | | - background-position: 0px 0px; |
156 | 111 | } |
157 | 112 | |
158 | 113 | .fr-text { |
— | — | @@ -197,33 +152,26 @@ |
198 | 153 | margin-top: 5px; |
199 | 154 | } |
200 | 155 | |
201 | | -.flaggedrevs_box0 { |
| 156 | +.flaggedrevs_box0, |
| 157 | +.flaggedrevs_box1, |
| 158 | +.flaggedrevs_box2, |
| 159 | +.flaggedrevs_box3 { |
202 | 160 | border: 1px solid #aaa; |
203 | | - background-color: #f9f9f9; |
204 | | - position: relative; |
205 | 161 | text-align: center; |
206 | 162 | font-size: 85%; |
207 | 163 | } |
| 164 | + |
| 165 | +.flaggedrevs_box0 { |
| 166 | + background-color: #f9f9f9; |
| 167 | +} |
208 | 168 | .flaggedrevs_box1 { |
209 | | - border: 1px solid #aaa; |
210 | 169 | background-color: #f0f8ff; |
211 | | - position: relative; |
212 | | - text-align: center; |
213 | | - font-size: 85%; |
214 | 170 | } |
215 | 171 | .flaggedrevs_box2 { |
216 | | - border: 1px solid #aaa; |
217 | 172 | background-color: #f0fff0; |
218 | | - position: relative; |
219 | | - text-align: center; |
220 | | - font-size: 85%; |
221 | 173 | } |
222 | 174 | .flaggedrevs_box3 { |
223 | | - border: 1px solid #aaa; |
224 | 175 | background-color: #fffff0; |
225 | | - position: relative; |
226 | | - text-align: center; |
227 | | - font-size: 85%; |
228 | 176 | } |
229 | 177 | |
230 | 178 | /* Hack to avoid extra borders */ |
Index: trunk/extensions/FlaggedRevs/FlaggedRevsPage.i18n.php |
— | — | @@ -22,13 +22,13 @@ |
23 | 23 | 'revreview-noflagged' => 'There are no reviewed revisions of this page, so it may \'\'\'not\'\'\' have been |
24 | 24 | [[Help:Article validation|checked]] for quality.', |
25 | 25 | |
| 26 | + 'revreview-quick-none' => '\'\'\'Current\'\'\'. No reviewed revisions.', |
26 | 27 | 'revreview-quick-see-quality' => '\'\'\'Current\'\'\'. [[{{fullurl:{{FULLPAGENAMEE}}|stable=1}} See latest quality revision]]', |
27 | 28 | 'revreview-quick-see-basic' => '\'\'\'Current\'\'\'. [[{{fullurl:{{FULLPAGENAMEE}}|stable=1}} See latest sighted revision]]', |
28 | 29 | 'revreview-quick-basic' => '\'\'\'[[Help:Article validation|Sighted]]\'\'\'. [[{{fullurl:{{FULLPAGENAMEE}}|stable=0}} See current revision]] |
29 | 30 | ($2 [{{fullurl:{{FULLPAGENAMEE}}|oldid=$1&diff=cur&editreview=1}} {{plural:$2|change|changes}}])', |
30 | 31 | 'revreview-quick-quality' => '\'\'\'[[Help:Article validation|Quality]]\'\'\'. [[{{fullurl:{{FULLPAGENAMEE}}|stable=0}} See current revision]] |
31 | 32 | ($2 [{{fullurl:{{FULLPAGENAMEE}}|oldid=$1&diff=cur&editreview=1}} {{plural:$2|change|changes}}])', |
32 | | - 'revreview-quick-none' => '\'\'\'Current\'\'\'. No reviewed revisions.', |
33 | 33 | 'revreview-newest-basic' => 'The [{{fullurl:{{FULLPAGENAMEE}}|stable=1}} latest sighted revision] |
34 | 34 | ([{{fullurl:Special:Stableversions|page={{FULLPAGENAMEE}}}} list all]) was [{{fullurl:Special:Log|type=review&page={{FULLPAGENAMEE}}}} approved] |
35 | 35 | on <i>$2</i>. [{{fullurl:{{FULLPAGENAMEE}}|oldid=$1&diff=cur&editreview=1}} $3 {{plural:$3|change|changes}}] {{plural:$3|needs|need}} review.', |
Index: trunk/extensions/FlaggedRevs/img/1-small.png |
Cannot display: file marked as a binary type. |
svn:mime-type = image/png |
Index: trunk/extensions/FlaggedRevs/img/2-small.png |
Cannot display: file marked as a binary type. |
svn:mime-type = image/png |
Index: trunk/extensions/FlaggedRevs/img/3-small.png |
Cannot display: file marked as a binary type. |
svn:mime-type = image/png |