r98734 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r98733‎ | r98734 | r98735 >
Date:02:38, 3 October 2011
Author:krinkle
Status:ok
Tags:
Comment:
[RL2] Make export form nicer and list the actual page titles as an unordered list with anchor tags
Modified paths:
  • /branches/RL2/extensions/Gadgets/SpecialGadgets.php (modified) (history)
  • /branches/RL2/extensions/Gadgets/modules/ext.gadgets.prejs.css (modified) (history)

Diff [purge]

Index: branches/RL2/extensions/Gadgets/SpecialGadgets.php
@@ -359,8 +359,10 @@
360360 // Translation subpages of module messages
361361 // @todo
362362
363 - // Get prefixed strings separated by new lines
 363+ // Build line-break separated string of prefixed titles
364364 $exportList = '';
 365+ // Build html for unordered list with links to the titles
 366+ $exportDisplayList = '<ul>';
365367 foreach ( $exportTitles as $exportTitle ) {
366368 // Make sure it's not null (for inexisting or invalid title)
367369 // and addionally check exists() to avoid exporting messages
@@ -369,8 +371,10 @@
370372 // (which we don't want to export)
371373 if ( is_object( $exportTitle ) && $exportTitle->exists() ) {
372374 $exportList .= $exportTitle->getPrefixedDBkey() . "\n";
 375+ $exportDisplayList .= '<li>'. Linker::link( $exportTitle ) . '</li>';
373376 }
374377 }
 378+ $exportDisplayList .= '</ul>';
375379
376380 global $wgScript;
377381 $form =
@@ -389,6 +393,7 @@
390394 )
391395 ->escaped()
392396 . '</p>'
 397+ . $exportDisplayList
393398 . Html::hidden( 'title', SpecialPage::getTitleFor( 'Export' )->getPrefixedDBKey() )
394399 . Html::hidden( 'pages', $exportList )
395400 . Html::hidden( 'wpDownload', '1' )
Index: branches/RL2/extensions/Gadgets/modules/ext.gadgets.prejs.css
@@ -58,3 +58,8 @@
5959 .mw-gadgets-gadgetlinks a {
6060 margin: 0 9px;
6161 }
 62+
 63+/* Export */
 64+.mw-gadgets-exportform fieldset {
 65+ max-width: 50%;
 66+}

Follow-up revisions

RevisionCommit summaryAuthorDate
r99980REL1_18 MFT r93726, r94199, r96437, r96438, r696579, r98235, r98734reedy22:13, 16 October 2011

Status & tagging log