r32083 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r32082‎ | r32083 | r32084 >
Date:23:25, 17 March 2008
Author:raymond
Status:old
Tags:
Comment:
* Add a nice fieldset around the input form
* Found CSS classes for aligning in shared.css -> use them!
Modified paths:
  • /trunk/phase3/includes/SpecialAllpages.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/SpecialAllpages.php
@@ -60,32 +60,34 @@
6161 * @param string $from Article name we are starting listing at.
6262 */
6363 function namespaceForm ( $namespace = NS_MAIN, $from = '' ) {
64 - global $wgScript, $wgContLang;
 64+ global $wgScript;
6565 $t = SpecialPage::getTitleFor( $this->name );
66 - $align = $wgContLang->isRtl() ? 'left' : 'right';
6766
6867 $out = Xml::openElement( 'div', array( 'class' => 'namespaceoptions' ) );
6968 $out .= Xml::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript ) );
7069 $out .= Xml::hidden( 'title', $t->getPrefixedText() );
 70+ $out .= Xml::openElement( 'fieldset' );
 71+ $out .= Xml::element( 'legend', null, wfMsg( 'allpages' ) );
7172 $out .= Xml::openElement( 'table', array( 'id' => 'nsselect', 'class' => 'allpages' ) );
7273 $out .= "<tr>
73 - <td align='$align'>" .
 74+ <td class='mw-label'>" .
7475 Xml::label( wfMsg( $this->nsfromMsg ), 'nsfrom' ) .
7576 "</td>
76 - <td>" .
 77+ <td class='mw-input'>" .
7778 Xml::input( 'from', 20, $from, array( 'id' => 'nsfrom' ) ) .
7879 "</td>
7980 </tr>
8081 <tr>
81 - <td align='$align'>" .
 82+ <td class='mw-label'>" .
8283 Xml::label( wfMsg( 'namespace' ), 'namespace' ) .
8384 "</td>
84 - <td>" .
85 - Xml::namespaceSelector( $namespace, null ) .
 85+ <td class='mw-input'>" .
 86+ Xml::namespaceSelector( $namespace, null ) . ' ' .
8687 Xml::submitButton( wfMsg( 'allpagessubmit' ) ) .
8788 "</td>
8889 </tr>";
8990 $out .= Xml::closeElement( 'table' );
 91+ $out .= Xml::closeElement( 'fieldset' );
9092 $out .= Xml::closeElement( 'form' );
9193 $out .= Xml::closeElement( 'div' );
9294 return $out;

Status & tagging log