r39839 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r39838‎ | r39839 | r39840 >
Date:16:00, 22 August 2008
Author:demon
Status:old
Tags:
Comment:
Tweak to UI for Special:Watchlist. Put a fieldset around the options. Looks cleaner to me :)
Modified paths:
  • /trunk/phase3/includes/specials/SpecialWatchlist.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesEn.php (modified) (history)
  • /trunk/phase3/maintenance/language/messages.inc (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/language/messages.inc
@@ -1436,6 +1436,7 @@
14371437 'watchlist-hide-anons',
14381438 'watchlist-show-liu',
14391439 'watchlist-hide-liu',
 1440+ 'watchlist-options',
14401441 ),
14411442 'watching' => array(
14421443 'watching',
Index: trunk/phase3/includes/specials/SpecialWatchlist.php
@@ -241,7 +241,7 @@
242242 );
243243 }
244244
245 - $wgOut->addHTML( "\n" . wlCutoffLinks( $days, 'Watchlist', $nondefaults ) . "<br />\n" );
 245+ $cutofflinks = "\n" . wlCutoffLinks( $days, 'Watchlist', $nondefaults ) . "<br />\n";
246246
247247 # Spit out some control panel links
248248 $thisTitle = SpecialPage::getTitleFor( 'Watchlist' );
@@ -272,10 +272,14 @@
273273 $linkBits = wfArrayToCGI( array( 'hideOwn' => 1 - (int)$hideOwn ), $nondefaults );
274274 $links[] = $skin->makeKnownLinkObj( $thisTitle, $label, $linkBits );
275275
276 - $wgOut->addHTML( implode( ' | ', $links ) );
277 -
278 - # Form for namespace filtering
279 - $form = Xml::openElement( 'form', array( 'method' => 'post', 'action' => $thisTitle->getLocalUrl() ) );
 276+ # Namespace filter and put the whole form together.
 277+ $form = Xml::openElement( 'fieldset', array( 'id' => 'mw-watchlist-options' ) );
 278+ $form .= Xml::openElement( 'legend', array( 'id' => 'mw-watchlist-legend' ) );
 279+ $form .= wfMsgExt( 'watchlist-options', array('escape') );
 280+ $form .= Xml::closeElement( 'legend' );
 281+ $form .= $cutofflinks;
 282+ $form .= implode( ' | ', $links );
 283+ $form .= Xml::openElement( 'form', array( 'method' => 'post', 'action' => $thisTitle->getLocalUrl() ) );
280284 $form .= '<p>';
281285 $form .= Xml::label( wfMsg( 'namespace' ), 'namespace' ) . '&nbsp;';
282286 $form .= Xml::namespaceSelector( $nameSpace, '' ) . '&nbsp;';
@@ -293,6 +297,7 @@
294298 if( $hideOwn )
295299 $form .= Xml::hidden( 'hideOwn', 1 );
296300 $form .= Xml::closeElement( 'form' );
 301+ $form .= Xml::closeElement( 'fieldset' );
297302 $wgOut->addHtml( $form );
298303
299304 # If there's nothing to show, stop here
Index: trunk/phase3/languages/messages/MessagesEn.php
@@ -2164,6 +2164,7 @@
21652165 'watchlist-hide-anons' => 'Hide anonymous edits',
21662166 'watchlist-show-liu' => 'Show logged-in user edits',
21672167 'watchlist-hide-liu' => 'Hide logged-in user edits',
 2168+'watchlist-options' => 'Watchlist options',
21682169
21692170 # Displayed when you click the "watch" button and it is in the process of watching
21702171 'watching' => 'Watching...',

Status & tagging log