Index: trunk/extensions/FlaggedRevs/language/FlaggedRevs.i18n.php |
— | — | @@ -43,10 +43,11 @@ |
44 | 44 | 'grouppage-autoreview' => '{{ns:project}}:Autoreviewer', |
45 | 45 | 'hist-draft' => 'draft revision', |
46 | 46 | 'hist-quality' => 'quality revision', |
47 | | - 'hist-quality-user' => '[{{fullurl:$1|stableid=$2}} validated] by [[User:$3|$3]]', |
| 47 | + 'hist-quality-user' => '[{{fullurl:$1|stableid=$2}} approved] by [[User:$3|$3]]', |
48 | 48 | 'hist-stable' => 'sighted revision', |
49 | 49 | 'hist-stable-user' => '[{{fullurl:$1|stableid=$2}} sighted] by [[User:$3|$3]]', |
50 | 50 | 'hist-autoreviewed' => '[{{fullurl:$1|stableid=$2}} automatically sighted]', |
| 51 | + 'revreview-hist-pending' => '[pending review]', |
51 | 52 | 'review-edit-diff' => '\'\'\'NOTICE: Some pending changes to the published version are incorporated into the edit form below.\'\'\'', |
52 | 53 | 'revreview-diff-toggle-show' => '(show changes)', |
53 | 54 | 'revreview-diff-toggle-hide' => '(hide changes)', |
Index: trunk/extensions/FlaggedRevs/FlaggedRevsXML.php |
— | — | @@ -199,13 +199,10 @@ |
200 | 200 | $time = $wgLang->date( $frev->getTimestamp(), true ); |
201 | 201 | # Some checks for which tag CSS to use |
202 | 202 | if( $pristine ) { |
203 | | - $tagClass = 'flaggedrevs-box3'; |
204 | 203 | $color = 'flaggedrevs-color-3'; |
205 | 204 | } elseif( $quality ) { |
206 | | - $tagClass = 'flaggedrevs-box2'; |
207 | 205 | $color = 'flaggedrevs-color-2'; |
208 | 206 | } else { |
209 | | - $tagClass = 'flaggedrevs-box1'; |
210 | 207 | $color = 'flaggedrevs-color-1'; |
211 | 208 | } |
212 | 209 | # Construct some tagging |
Index: trunk/extensions/FlaggedRevs/FlaggedRevs.hooks.php |
— | — | @@ -1676,14 +1676,35 @@ |
1677 | 1677 | return true; |
1678 | 1678 | } |
1679 | 1679 | |
1680 | | - public static function addToHistLine( $history, $row, &$s ) { |
1681 | | - if( $row->rev_deleted & Revision::DELETED_TEXT ) |
1682 | | - return true; // Don't bother showing notice for deleted revs |
1683 | | - if( !isset($row->fr_quality) ) |
1684 | | - return true; // Unreviewed |
1685 | | - # Add link to stable version of *this* rev, if any |
1686 | | - list($link,$class) = FlaggedRevs::markHistoryRow( |
1687 | | - $history->getArticle()->getTitle(), $row ); |
| 1680 | + public static function addToHistLine( $history, $row, &$s, &$liClasses ) { |
| 1681 | + $title = $history->getArticle()->getTitle(); |
| 1682 | + if( !FlaggedRevs::isPageReviewable( $title ) ) { |
| 1683 | + return false; // nothing to do here |
| 1684 | + } |
| 1685 | + # Fetch and process cache the stable revision |
| 1686 | + if( !isset($history->fr_stableRevId) ) { |
| 1687 | + $frev = FlaggedRevision::newFromStable( $title ); |
| 1688 | + $history->fr_stableRevId = $frev ? $frev->getRevId() : 0; |
| 1689 | + } |
| 1690 | + if( !$history->fr_stableRevId ) { |
| 1691 | + return false; // nothing to do here |
| 1692 | + } |
| 1693 | + // Unreviewed revision: highlight if pending |
| 1694 | + $link = $class = ''; |
| 1695 | + if( !isset($row->fr_quality) ) { |
| 1696 | + if( $row->rev_id > $history->fr_stableRevId ) { |
| 1697 | + $class = 'flaggedrevs-unreviewed'; |
| 1698 | + $link = '<strong>'.wfMsgHtml('revreview-hist-pending').'</strong>'; |
| 1699 | + } |
| 1700 | + // Reviewed revision: highlight and add link |
| 1701 | + } else if( !($row->rev_deleted & Revision::DELETED_TEXT) ) { |
| 1702 | + # Add link to stable version of *this* rev, if any |
| 1703 | + list($link,$class) = FlaggedRevs::markHistoryRow( $title, $row ); |
| 1704 | + # Space out and demark the stable revision |
| 1705 | + if( $row->rev_id == $history->fr_stableRevId ) { |
| 1706 | + $liClasses[] = 'flaggedrevs_hist_stable'; |
| 1707 | + } |
| 1708 | + } |
1688 | 1709 | # Style the row as needed |
1689 | 1710 | if( $class ) $s = "<span class='$class'>$s</span>"; |
1690 | 1711 | # Add stable old version link |
Index: trunk/extensions/FlaggedRevs/img/boxC.png |
Cannot display: file marked as a binary type. |
svn:mime-type = image/png |
Index: trunk/extensions/FlaggedRevs/client/flaggedrevs.css |
— | — | @@ -1,14 +1,13 @@ |
2 | 2 | /* Every time you change this CSS please bump $wgFlaggedRevStyleVersion in FlaggedRevs.php */ |
3 | 3 | |
4 | 4 | /* Standard User Interface */ |
5 | | -.flaggedrevs_basic, |
6 | | -.flaggedrevs_quality, |
7 | | -.flaggedrevs_pristine, |
8 | | -.flaggedrevs_notice, |
9 | | -.flaggedrevs_editnotice, |
10 | | -.flaggedrevs_diffnotice, |
11 | | -.flaggedrevs_warning, |
12 | | -.flaggedrevs_preview { |
| 5 | +div.flaggedrevs_basic, |
| 6 | +div.flaggedrevs_quality, |
| 7 | +div.flaggedrevs_pristine, |
| 8 | +div.flaggedrevs_notice, |
| 9 | +div.flaggedrevs_diffnotice, |
| 10 | +div.flaggedrevs_preview, |
| 11 | +table.flaggedrevs_editnotice { |
13 | 12 | border: 1px solid #aaa; |
14 | 13 | padding: 5px; |
15 | 14 | font-weight: normal; |
— | — | @@ -18,40 +17,34 @@ |
19 | 18 | clear: both; |
20 | 19 | } |
21 | 20 | |
22 | | -.flaggedrevs_basic { |
| 21 | +div.flaggedrevs_basic { |
23 | 22 | background-color: #f0f8ff; |
24 | 23 | } |
25 | | -.flaggedrevs_quality { |
| 24 | +div.flaggedrevs_quality { |
26 | 25 | background-color: #f0fff0; |
27 | 26 | } |
28 | | -.flaggedrevs_pristine { |
| 27 | +div.flaggedrevs_pristine { |
29 | 28 | background-color: #fffff0; |
30 | 29 | } |
31 | | -.flaggedrevs_notice { |
| 30 | +div.flaggedrevs_notice { |
32 | 31 | background-color: #f9f9f9; |
33 | 32 | } |
34 | | -.flaggedrevs_preview { |
| 33 | +div.flaggedrevs_preview { |
35 | 34 | background-color: #f9f9f9; |
36 | 35 | color: #8b0000; |
37 | 36 | } |
38 | | - |
39 | | -.flaggedrevs_warning { |
40 | | - font-size: 85%; |
41 | | - background-color: #fffff0; |
42 | | - margin: 0em 1em 0em 0em; |
43 | | -} |
44 | | -.flaggedrevs_editnotice { |
45 | | - font-size: 85%; |
| 37 | +table.flaggedrevs_editnotice { |
| 38 | + font-size: 90%; |
46 | 39 | background-color: #f9f9f9; |
47 | 40 | text-align: left; |
48 | 41 | width: 100%; |
49 | 42 | } |
50 | | -.flaggedrevs_diffnotice { |
| 43 | +div.flaggedrevs_diffnotice { |
51 | 44 | font-size: 85%; |
52 | 45 | background-color: #f9f9f9; |
53 | 46 | } |
54 | 47 | |
55 | | -.flaggedrevs_notes { |
| 48 | +div.flaggedrevs_notes { |
56 | 49 | border: 1px solid #aaa; |
57 | 50 | background-color: #f9f9f9; |
58 | 51 | padding: 5px; |
— | — | @@ -65,19 +58,6 @@ |
66 | 59 | width: 100px; |
67 | 60 | } |
68 | 61 | |
69 | | -.fr-checkbox { |
70 | | - padding: 0px; |
71 | | - width: 16px; |
72 | | - height: 16px; |
73 | | - position: relative; |
74 | | - float: left; |
75 | | - top: 0px; |
76 | | - right: 0px; |
77 | | - background-repeat: no-repeat; |
78 | | - background-position: 0px 0px; |
79 | | - background-image: url(../../FlaggedRevs/img/boxC.png); |
80 | | -} |
81 | | - |
82 | 62 | .fr-marker-20, |
83 | 63 | .fr-marker-40, |
84 | 64 | .fr-marker-60, |
— | — | @@ -105,7 +85,7 @@ |
106 | 86 | } |
107 | 87 | |
108 | 88 | /* Short User Interface */ |
109 | | -.flaggedrevs_short { |
| 89 | +div.flaggedrevs_short { |
110 | 90 | border: 0px; |
111 | 91 | background-color: #f9f9f9; |
112 | 92 | padding: 1px; |
— | — | @@ -118,7 +98,7 @@ |
119 | 99 | line-height: 16px; |
120 | 100 | } |
121 | 101 | |
122 | | -.rtl .flaggedrevs_short { |
| 102 | +.rtl div.flaggedrevs_short { |
123 | 103 | float: left; |
124 | 104 | margin: 0 1em 0 0; |
125 | 105 | } |
— | — | @@ -162,29 +142,6 @@ |
163 | 143 | background-image: url(../../FlaggedRevs/img/fr-marker-100.png); |
164 | 144 | } |
165 | 145 | |
166 | | -.flaggedrevs-box0, |
167 | | -.flaggedrevs-box1, |
168 | | -.flaggedrevs-box2, |
169 | | -.flaggedrevs-box3 { |
170 | | - border: 1px solid #aaa; |
171 | | - text-align: center; |
172 | | - font-size: 85%; |
173 | | - clear: both; |
174 | | -} |
175 | | - |
176 | | -.flaggedrevs-box0 { |
177 | | - background-color: #f9f9f9; |
178 | | -} |
179 | | -.flaggedrevs-box1 { |
180 | | - background-color: #f0f8ff; |
181 | | -} |
182 | | -.flaggedrevs-box2 { |
183 | | - background-color: #f0fff0; |
184 | | -} |
185 | | -.flaggedrevs-box3 { |
186 | | - background-color: #fffff0; |
187 | | -} |
188 | | - |
189 | 146 | /* Both User Interfaces */ |
190 | 147 | .flaggedrevs-color-0 { |
191 | 148 | background-color: #f9f9f9; |
— | — | @@ -200,19 +157,23 @@ |
201 | 158 | } |
202 | 159 | |
203 | 160 | .flaggedrevs-unreviewed { |
204 | | - background-color: #fffff0; |
| 161 | + background-color: #ffeeaa; |
205 | 162 | } |
206 | 163 | |
207 | 164 | .flaggedrevs-unreviewed2 { |
208 | 165 | background-color: #faebd7; |
209 | 166 | } |
210 | 167 | |
211 | | -.flaggedrevs_toggle { |
| 168 | +a.flaggedrevs_toggle { |
212 | 169 | color: blue; |
213 | 170 | white-space: nowrap; |
214 | 171 | cursor:pointer; |
215 | 172 | } |
216 | 173 | |
| 174 | +li.flaggedrevs_hist_stable { |
| 175 | + margin-top: 2em; |
| 176 | +} |
| 177 | + |
217 | 178 | .fr-icon-current, |
218 | 179 | .fr-icon-stable, |
219 | 180 | .fr-icon-quality, |