Index: trunk/extensions/Interwiki/SpecialInterwiki_body.php |
— | — | @@ -206,15 +206,19 @@ |
207 | 207 | } |
208 | 208 | } |
209 | 209 | |
210 | | - function trans_local($tl, $msg0, $msg1) |
211 | | - { |
212 | | - if($tl==='0') return ($msg0); |
213 | | - if($tl==='1') return ($msg1); |
214 | | - return ( htmlspecialchars( $tl )); |
| 210 | + function trans_local( $tl, $msg0, $msg1 ) { |
| 211 | + if( $tl==='0' ) |
| 212 | + return $msg0; |
| 213 | + if( $tl==='1' ) |
| 214 | + return $msg1; |
| 215 | + return htmlspecialchars( $tl ); |
215 | 216 | } |
216 | 217 | |
217 | 218 | function showList( $admin ) { |
218 | | - global $wgUser, $wgOut; |
| 219 | + global $wgUser, $wgOut, $wgScriptPath; |
| 220 | + |
| 221 | + $wgOut->addExtensionStyle( "{$wgScriptPath}/extensions/Interwiki/SpecialInterwiki.css" ); |
| 222 | + |
219 | 223 | $prefixmessage = wfMsgHtml( 'interwiki_prefix' ); |
220 | 224 | $urlmessage = wfMsgHtml( 'interwiki_url' ); |
221 | 225 | $localmessage = wfMsgHtml( 'interwiki_local' ); |
— | — | @@ -222,17 +226,16 @@ |
223 | 227 | $message_0 = wfMsgHtml( 'interwiki_0' ); |
224 | 228 | $message_1 = wfMsgHtml( 'interwiki_1' ); |
225 | 229 | |
226 | | - $sty='padding-right:1.4ex; vertical-align:top; text-align:'; |
227 | 230 | $out = ' |
228 | | -<table width="100%" cellspacing="0" cellpadding="0" border="0" style="border:0" class="wikitable"> |
229 | | -<tr><th style="'.$sty.'left">'.$prefixmessage.'</th><td>'.wfMsg( 'interwiki_prefix_intro' ).'</td></tr> |
230 | | -<tr><th style="'.$sty.'left">'.$urlmessage.'</th><td>'.wfMsg( 'interwiki_url_intro' ).'</td></tr> |
231 | | -<tr><th style="'.$sty.'left">'.$localmessage.'</th><td>'.wfMsg( 'interwiki_local_intro' ).'</td></tr> |
232 | | -<tr><th style="'.$sty.'right">'.$message_0.'</th><td>'.wfMsg( 'interwiki_local_0_intro' ).'</td></tr> |
233 | | -<tr><th style="'.$sty.'right">'.$message_1.'</th><td>'.wfMsg( 'interwiki_local_1_intro' ).'</td></tr> |
234 | | -<tr><th style="'.$sty.'left">'.$transmessage.'</th><td>'.wfMsg( 'interwiki_trans_intro' ).'</td></tr> |
235 | | -<tr><th style="'.$sty.'right">'.$message_1.'</th><td>'.wfMsg( 'interwiki_trans_1_intro' ).'</td></tr> |
236 | | -<tr><th style="'.$sty.'right">'.$message_0.'</th><td>'.wfMsg( 'interwiki_trans_0_intro' ).'</td></tr> |
| 231 | +<table width="100%" cellspacing="0" cellpadding="0" border="0" style="border:0" class="mw-interwikitable intro"> |
| 232 | +<tr><th class="mw-align-left">' . $prefixmessage . '</th><td>' . wfMsgExt( 'interwiki_prefix_intro', 'parseinline' ) . '</td></tr> |
| 233 | +<tr><th class="mw-align-left">' . $urlmessage . '</th><td>' . wfMsgExt( 'interwiki_url_intro', 'parseinline' ) . '</td></tr> |
| 234 | +<tr><th class="mw-align-left">' . $localmessage . '</th><td>' . wfMsgExt( 'interwiki_local_intro', 'parseinline' ) . '</td></tr> |
| 235 | +<tr><th class="mw-align-right">' . $message_0 . '</th><td>' . wfMsgExt( 'interwiki_local_0_intro', 'parseinline' ) . '</td></tr> |
| 236 | +<tr><th class="mw-align-right">' . $message_1 . '</th><td>' . wfMsgExt( 'interwiki_local_1_intro', 'parseinline' ) . '</td></tr> |
| 237 | +<tr><th class="mw-align-left">' . $transmessage . '</th><td>' . wfMsgExt( 'interwiki_trans_intro', 'parseinline' ) . '</td></tr> |
| 238 | +<tr><th class="mw-align-right">' . $message_1 . '</th><td>' . wfMsgExt( 'interwiki_trans_1_intro', 'parseinline' ) . '</td></tr> |
| 239 | +<tr><th class="mw-align-right">' . $message_0 . '</th><td>' . wfMsgExt( 'interwiki_trans_0_intro', 'parseinline' ) . '</td></tr> |
237 | 240 | </table> |
238 | 241 | '; |
239 | 242 | $wgOut->addWikiMsg( 'interwiki_intro' ); |
— | — | @@ -244,7 +247,7 @@ |
245 | 248 | $skin = $wgUser->getSkin(); |
246 | 249 | $addtext = wfMsgHtml( 'interwiki_addtext' ); |
247 | 250 | $addlink = $skin->link( $selfTitle, $addtext, array(), array( 'action' => 'add' ) ); |
248 | | - $wgOut->addHTML( '<ul>' . '<li>' . $addlink . '</li>' . '</ul>' ); |
| 251 | + $wgOut->addHTML( '<p>' . $addlink . '</p>' ); |
249 | 252 | } |
250 | 253 | |
251 | 254 | $dbr = wfGetDB( DB_SLAVE ); |
— | — | @@ -256,8 +259,7 @@ |
257 | 260 | } |
258 | 261 | |
259 | 262 | $out = " |
260 | | - <br /> |
261 | | - <table width='100%' style='border:1px solid #aaa;' class='wikitable'> |
| 263 | + <table width='100%' class='mw-interwikitable body'> |
262 | 264 | <tr id='interwikitable-header'><th>$prefixmessage</th> <th>$urlmessage</th> <th>$localmessage</th> <th>$transmessage</th>"; |
263 | 265 | if( $admin ) { |
264 | 266 | $deletemessage = wfMsgHtml( 'delete' ); |
— | — | @@ -274,8 +276,8 @@ |
275 | 277 | $out .= "<tr class='mw-interwikitable-row'> |
276 | 278 | <td class='mw-interwikitable-prefix'>$prefix</td> |
277 | 279 | <td class='mw-interwikitable-url'>$url</td> |
278 | | - <td class='center mw-interwikitable-local'>$local</td> |
279 | | - <td class='center mw-interwikitable-trans'>$trans</td>"; |
| 280 | + <td class='mw-interwikitable-local'>$local</td> |
| 281 | + <td class='mw-interwikitable-trans'>$trans</td>"; |
280 | 282 | if( $admin ) { |
281 | 283 | $out .= '<td class="mw-interwikitable-modify">'; |
282 | 284 | $out .= $skin->link( $selfTitle, $editmessage, array(), |
Index: trunk/extensions/Interwiki/SpecialInterwiki.css |
— | — | @@ -0,0 +1,41 @@ |
| 2 | + |
| 3 | +/** |
| 4 | + * CSS for Special:Interwiki |
| 5 | + */ |
| 6 | + |
| 7 | +table.mw-interwikitable { |
| 8 | + margin: 1em 1em 1em 0; |
| 9 | + background: #fdfdfd; |
| 10 | + border: 1px #aaa solid; |
| 11 | + border-collapse: collapse; |
| 12 | +} |
| 13 | + |
| 14 | +table.mw-interwikitable th, |
| 15 | +table.mw-interwikitable td { |
| 16 | + border: 1px #aaa solid; |
| 17 | + padding: 0.2em; |
| 18 | +} |
| 19 | + |
| 20 | +table.mw-interwikitable th { |
| 21 | + background: #f2f2f2; |
| 22 | + text-align: center; |
| 23 | +} |
| 24 | + |
| 25 | +table.mw-interwikitable.intro th { |
| 26 | + padding-right: 1.4ex; |
| 27 | + vertical-align: top; |
| 28 | +} |
| 29 | + |
| 30 | +table.mw-interwikitable.intro th.mw-align-left { |
| 31 | + text-align: left; |
| 32 | +} |
| 33 | + |
| 34 | +table.mw-interwikitable.intro th.mw-align-right { |
| 35 | + text-align: right; |
| 36 | +} |
| 37 | + |
| 38 | +table.mw-interwikitable.body td.mw-interwikitable-local, |
| 39 | +table.mw-interwikitable.body td.mw-interwikitable-trans { |
| 40 | + text-align: center; |
| 41 | +} |
| 42 | + |
Property changes on: trunk/extensions/Interwiki/SpecialInterwiki.css |
___________________________________________________________________ |
Name: svn:eol-style |
1 | 43 | + native |