Tweak to UI for Special:Watchlist. Put a fieldset around the options. Looks cleaner...
authorChad Horohoe <demon@users.mediawiki.org>
Fri, 22 Aug 2008 16:00:04 +0000 (16:00 +0000)
committerChad Horohoe <demon@users.mediawiki.org>
Fri, 22 Aug 2008 16:00:04 +0000 (16:00 +0000)
includes/specials/SpecialWatchlist.php
languages/messages/MessagesEn.php
maintenance/language/messages.inc

index e67c4fd..a500ab0 100644 (file)
@@ -241,7 +241,7 @@ function wfSpecialWatchlist( $par ) {
                );
        }
 
-       $wgOut->addHTML( "\n" . wlCutoffLinks( $days, 'Watchlist', $nondefaults ) . "<br />\n" );
+       $cutofflinks = "\n" . wlCutoffLinks( $days, 'Watchlist', $nondefaults ) . "<br />\n";
 
        # Spit out some control panel links
        $thisTitle = SpecialPage::getTitleFor( 'Watchlist' );
@@ -272,10 +272,14 @@ function wfSpecialWatchlist( $par ) {
        $linkBits = wfArrayToCGI( array( 'hideOwn' => 1 - (int)$hideOwn ), $nondefaults );
        $links[] = $skin->makeKnownLinkObj( $thisTitle, $label, $linkBits );
 
-       $wgOut->addHTML( implode( ' | ', $links ) );
-
-       # Form for namespace filtering
-       $form  = Xml::openElement( 'form', array( 'method' => 'post', 'action' => $thisTitle->getLocalUrl() ) );
+       # Namespace filter and put the whole form together.
+       $form  = Xml::openElement( 'fieldset', array( 'id' => 'mw-watchlist-options' ) );
+       $form .= Xml::openElement( 'legend', array( 'id' => 'mw-watchlist-legend' ) );
+       $form .= wfMsgExt( 'watchlist-options', array('escape') );
+       $form .= Xml::closeElement( 'legend' );
+       $form .= $cutofflinks;
+       $form .= implode( ' | ', $links );
+       $form .= Xml::openElement( 'form', array( 'method' => 'post', 'action' => $thisTitle->getLocalUrl() ) );
        $form .= '<p>';
        $form .= Xml::label( wfMsg( 'namespace' ), 'namespace' ) . '&nbsp;';
        $form .= Xml::namespaceSelector( $nameSpace, '' ) . '&nbsp;';
@@ -293,6 +297,7 @@ function wfSpecialWatchlist( $par ) {
        if( $hideOwn )
                $form .= Xml::hidden( 'hideOwn', 1 );
        $form .= Xml::closeElement( 'form' );
+       $form .= Xml::closeElement( 'fieldset' );
        $wgOut->addHtml( $form );
 
        # If there's nothing to show, stop here
index f05b876..7b88b8f 100644 (file)
@@ -2164,6 +2164,7 @@ Future changes to this page and its associated talk page will be listed there, a
 'watchlist-hide-anons' => 'Hide anonymous edits',
 'watchlist-show-liu'   => 'Show logged-in user edits',
 'watchlist-hide-liu'   => 'Hide logged-in user edits',
+'watchlist-options'    => 'Watchlist options',
 
 # Displayed when you click the "watch" button and it is in the process of watching
 'watching'   => 'Watching...',
index 9619dfa..d996877 100644 (file)
@@ -1436,6 +1436,7 @@ $wgMessageStructure = array(
                'watchlist-hide-anons',
                'watchlist-show-liu',
                'watchlist-hide-liu',
+               'watchlist-options',
        ),
        'watching' => array(
                'watching',