Index: branches/wikidata/phase3/includes/SpecialNamespaces.php |
— | — | @@ -75,36 +75,36 @@ |
76 | 76 | } |
77 | 77 | |
78 | 78 | $addnshtmlform=' |
| 79 | +<div id="addnsForm"> |
79 | 80 | <form name="addnamespaces" method="post" action="'.$action.'"> |
80 | | -<table border="0"> |
81 | | -<tr valign="top"><td> |
82 | | -'.wfMsg('add_namespace_default_name').'</td> |
83 | | -<td> |
84 | | -<input type="hidden" name="nsAction" value="addnamespaces" /> |
85 | | -<input type="text" name="nsName" size="20"'.$talkpagejs.' /> |
86 | | -</td> |
87 | | -</tr> |
88 | | -<tr valign="top"> |
89 | | -<td> |
90 | | -'.wfMsg('add_namespace_default_talk').'<br /> |
91 | | -</td> |
92 | | -<td><input type="text" name="nsTalkName" size="20" /> |
93 | | -</td> |
94 | | -</tr> |
95 | | -<tr> |
96 | | -<td colspan="2"> |
97 | | -<label><input type="checkbox" name="nsCreateTalk" checked /> |
98 | | -'.wfMsg('add_namespace_talk_confirm').' |
99 | | -</label> |
100 | | -</td> |
101 | | -</tr> |
| 81 | +<table> |
| 82 | + <tr valign="top"> |
| 83 | + <td>'.wfMsg('add_namespace_default_name').'</td> |
| 84 | + <td> |
| 85 | + <input type="hidden" name="nsAction" value="addnamespaces" /> |
| 86 | + <input type="text" name="nsName" size="20"'.$talkpagejs.' /> |
| 87 | + </td> |
| 88 | + </tr> |
| 89 | + <tr valign="top"> |
| 90 | + <td>'.wfMsg('add_namespace_default_talk').'<br /></td> |
| 91 | + <td><input type="text" name="nsTalkName" size="20" /></td> |
| 92 | + </tr> |
| 93 | + <tr> |
| 94 | + <td colspan="2"> |
| 95 | + <label> |
| 96 | + <input type="checkbox" name="nsCreateTalk" checked />'.wfMsg('add_namespace_talk_confirm').' |
| 97 | + </label> |
| 98 | + </td> |
| 99 | + </tr> |
102 | 100 | </table> |
103 | 101 | <input type="hidden" name="wpEditToken" value="'.$token.'" /> |
104 | 102 | <input type="submit" value="'.wfMsg('add_namespace_button').'" /> |
105 | | -</form>'; |
| 103 | +</form> |
| 104 | +</div> |
| 105 | +'; |
106 | 106 | $wgOut->addHTML($addnshtmlform); |
107 | 107 | |
108 | | - $wgOut->addWikiText( wfMsg( "modify_namespaces_header" ) ); |
| 108 | + $wgOut->addWikiText( wfMsg( 'modify_namespaces_header' ) ); |
109 | 109 | |
110 | 110 | // Array of messages to be used |
111 | 111 | $nsMessages = array ( |
— | — | @@ -122,7 +122,7 @@ |
123 | 123 | } |
124 | 124 | |
125 | 125 | // Initialise the form |
126 | | - $htmlform=<<<END |
| 126 | + $htmlform = <<<END |
127 | 127 | <form name="changenamespaces" method="post" action="{$action}"> |
128 | 128 | <input type="hidden" name="nsAction" value="changenamespaces" /> |
129 | 129 | <input type="hidden" name="wpEditToken" value="{$token}" /> |
— | — | @@ -160,50 +160,36 @@ |
161 | 161 | |
162 | 162 | // TODO : fix code below, maybe use HTMLForm ? |
163 | 163 | |
164 | | - $namespaceselect_html=<<<END |
165 | | -<tr valign="top"><td colspan="2"> |
166 | | -{$namespace_child_of}<br /> |
167 | | -<select name="ns{$index}Parent" size="1"> |
168 | | -{$namespaceselect} |
169 | | -</select> |
170 | | -</td> |
| 164 | + $namespaceselect_html = <<<END |
| 165 | +<tr valign="top"> |
| 166 | + <td colspan="2">{$namespace_child_of}<br /> |
| 167 | + <select name="ns{$index}Parent" size="1">{$namespaceselect}</select> |
| 168 | + </td> |
171 | 169 | </tr> |
172 | 170 | END; |
173 | | - $subpages_html=<<<END |
174 | | -<tr valign="top"><td> |
175 | | -{$namespace_support_subpages} |
176 | | -</td> |
177 | | -<td align="right"> |
178 | | -<input type="checkbox" name="ns{$index}Subpages" {$subpages} /> |
179 | | -</td> |
180 | | -</tr> |
| 171 | + $subpages_html = <<<END |
| 172 | +<tr valign="top"> |
| 173 | + <td>{$namespace_support_subpages}</td> |
| 174 | + <td align="right"><input type="checkbox" name="ns{$index}Subpages" {$subpages} /></td> |
| 175 | +</tr> |
181 | 176 | END; |
182 | | - $searchdefault_html=<<<END |
183 | | -<tr valign="top"><td> |
184 | | -{$namespace_search_by_default} |
185 | | -</td> |
186 | | -<td align="right"> |
187 | | -<input type="checkbox" name="ns{$index}Search" {$searchdefault} /> |
188 | | -</td> |
189 | | -</tr> |
| 177 | + $searchdefault_html = <<<END |
| 178 | +<tr valign="top"> |
| 179 | + <td>{$namespace_search_by_default}</td> |
| 180 | + <td align="right"><input type="checkbox" name="ns{$index}Search" {$searchdefault} /></td> |
| 181 | +</tr> |
190 | 182 | END; |
191 | | - $hide_html=<<<END |
192 | | -<tr valign="top"><td> |
193 | | -{$namespace_hide_in_lists} |
194 | | -</td> |
195 | | -<td align="right"> |
196 | | -<input type="checkbox" name="ns{$index}Hidden" {$hidden} /> |
197 | | -</td> |
198 | | -</tr> |
| 183 | + $hide_html = <<<END |
| 184 | +<tr valign="top"> |
| 185 | + <td>{$namespace_hide_in_lists}</td> |
| 186 | + <td align="right"><input type="checkbox" name="ns{$index}Hidden" {$hidden} /></td> |
| 187 | +</tr> |
199 | 188 | END; |
200 | | - $target_html=<<<END |
201 | | -<tr valign="top"><td> |
202 | | -{$namespace_default_link_prefix} |
203 | | -</td> |
204 | | -<td align="right"> |
205 | | -<input type="text" size="10" name="ns{$index}Linkprefix" value="{$linkprefix}" /> |
206 | | -</td> |
207 | | -</tr> |
| 189 | + $target_html = <<<END |
| 190 | +<tr valign="top"> |
| 191 | + <td>{$namespace_default_link_prefix}</td> |
| 192 | + <td align="right"><input type="text" size="10" name="ns{$index}Linkprefix" value="{$linkprefix}" /></td> |
| 193 | +</tr> |
208 | 194 | END; |
209 | 195 | $special_html=''; |
210 | 196 | |
— | — | @@ -215,12 +201,7 @@ |
216 | 202 | $hide_html = ''; |
217 | 203 | $target_html = ''; |
218 | 204 | $special_namespace = wfMsg('special_namespace'); |
219 | | - $special_html = <<<END |
220 | | -<tr valign="top"><td colspan="2"> |
221 | | -<em>{$special_namespace}</em> |
222 | | -</td> |
223 | | -</tr> |
224 | | -END; |
| 205 | + $special_html = '<tr valign="top"><td colspan="2"><em>'.$special_namespace.'</em></td></tr>' . "\n"; |
225 | 206 | } |
226 | 207 | |
227 | 208 | |
— | — | @@ -229,12 +210,9 @@ |
230 | 211 | if( $ns->getSystemType() ) { |
231 | 212 | // No delete link ? |
232 | 213 | $systemtype_html = <<<END |
233 | | -<tr valign="top"><td> |
234 | | -<b><font color="red">{$namespace_system}</font></b> |
235 | | -</td> |
236 | | -<td align="right"> |
237 | | -<b>{$systemtype}</b> |
238 | | -</td> |
| 214 | +<tr valign="top"> |
| 215 | + <td><b><font color="red">{$namespace_system}</font></b></td> |
| 216 | + <td align="right"><b>{$systemtype}</b></td> |
239 | 217 | </tr> |
240 | 218 | END; |
241 | 219 | $deletenamespace_html = ''; |
— | — | @@ -242,32 +220,31 @@ |
243 | 221 | // Give out a link to delete the namespace |
244 | 222 | $sk = $wgUser->getSkin(); |
245 | 223 | $delete_link = $sk->makeKnownLinkObj( $wgTitle, wfMsg('delete_namespace'), 'action=delete&ns=' . $index ); |
246 | | - $deletenamespace_html = <<<END |
247 | | -<tr valign="top"><td colspan="2"> |
248 | | -<b>{$delete_link}</b> |
249 | | -</td> |
250 | | -</tr> |
251 | | -END; |
| 224 | + $deletenamespace_html = '<tr valign="top"><td colspan="2"><b>'.$delete_link.'</b></td></tr>' . "\n"; |
252 | 225 | $systemtype_html=''; |
253 | 226 | } |
254 | 227 | |
255 | 228 | |
256 | 229 | // Yet another table of tables :p |
257 | | - |
258 | 230 | $htmlform .= <<<END |
259 | | -<table border="0"> |
| 231 | +<table class="specialnamespaces"> |
260 | 232 | <tr valign="top"><td> |
261 | 233 | <table border="0" style="margin-right:1em;" width="300"> |
262 | 234 | <tr><th colspan="2">{$namespace_properties}</th></tr> |
263 | 235 | <tr><td>{$namespace_slot}</td><td align="right">{$index}</td></tr> |
264 | | - {$systemtype_html} |
265 | | - {$special_html} |
266 | | - {$subpages_html} |
267 | | - {$searchdefault_html} |
268 | | - {$hide_html} |
269 | | - {$target_html} |
270 | | - {$namespaceselect_html} |
271 | | - {$deletenamespace_html} |
| 236 | +END; |
| 237 | + // Also add html part generated before |
| 238 | + $htmlform .= |
| 239 | + $systemtype_html |
| 240 | + . $special_html |
| 241 | + . $subpages_html |
| 242 | + . $searchdefault_html |
| 243 | + . $hide_html |
| 244 | + . $target_html |
| 245 | + . $namespaceselect_html |
| 246 | + . $deletenamespace_html |
| 247 | + ; |
| 248 | +$htmlform .= <<<END |
272 | 249 | </table> |
273 | 250 | </td><td> |
274 | 251 | <table border="0"> |
— | — | @@ -323,16 +300,23 @@ |
324 | 301 | <td align="center"><input type="radio" name="ns{$index}Default" value="{$i}" /></td> |
325 | 302 | <td align="center"> </td> |
326 | 303 | </tr> |
| 304 | + |
327 | 305 | END; |
328 | 306 | } |
329 | | - $htmlform .= '</table></td></tr>'; |
330 | | - $htmlform .= '<tr><td colspan="2"><hr noshade /></td></tr>'; |
| 307 | + $htmlform .= |
| 308 | +<<<END |
| 309 | +</table> |
| 310 | + </td></tr> |
| 311 | +</table> |
| 312 | + |
| 313 | +END; |
331 | 314 | } |
332 | 315 | $htmlform.= |
333 | 316 | <<<END |
334 | 317 | <tr><td><input type="submit" value="{$namespace_save_changes}" /></td></tr> |
335 | 318 | </table> |
336 | 319 | </form> |
| 320 | + |
337 | 321 | END; |
338 | 322 | |
339 | 323 | // Ouput the form |
Index: branches/wikidata/phase3/skins/monobook/main.css |
— | — | @@ -1337,7 +1337,19 @@ |
1338 | 1338 | background-color: #f0f0ff; |
1339 | 1339 | } |
1340 | 1340 | |
| 1341 | +/* SpecialNamespaces table */ |
| 1342 | +table.specialnamespaces { |
| 1343 | + border: 1px solid #aaa; |
| 1344 | + margin-bottom: 1em; |
| 1345 | +} |
1341 | 1346 | |
| 1347 | +div#addnsForm { |
| 1348 | + margin-bottom: 1em; |
| 1349 | + border: 1px solid #aaa; |
| 1350 | + padding: 1.5em 2em; |
| 1351 | + background-color: #f9f9f9; |
| 1352 | +} |
| 1353 | + |
1342 | 1354 | /* noarticletext */ |
1343 | 1355 | div.noarticletext { |
1344 | 1356 | border: 1px solid #ccc; |
— | — | @@ -1345,4 +1357,3 @@ |
1346 | 1358 | padding: .2em 1em; |
1347 | 1359 | color: #000; |
1348 | 1360 | } |
1349 | | - |
Index: branches/wikidata/phase3/skins/common/common.css |
— | — | @@ -373,6 +373,12 @@ |
374 | 374 | background-color: #f0f0ff; |
375 | 375 | } |
376 | 376 | |
| 377 | +/* SpecialNamespace */ |
| 378 | +table.specialnamespaces { |
| 379 | + border : 1px solid black; |
| 380 | +} |
| 381 | + |
| 382 | + |
377 | 383 | #jump-to-nav { |
378 | 384 | display: none; |
379 | | -} |
\ No newline at end of file |
| 385 | +} |