) {
$this->title = $title;
$this->setContext( $context );
- $this->getOutput()->addModuleStyles( array(
- 'mediawiki.action.view.categoryPage.styles'
- ) );
$this->from = $from;
$this->until = $until;
$this->limit = $context->getConfig()->get( 'CategoryPagingLimit' );
if ( $rescnt > 0 ) {
# Showing subcategories
- $r .= Html::openElement( 'div', array( 'id' => 'mw-subcategories' ) );
- $r .= "\n";
- $r .= Html::element( 'h2', array(), $this->msg( 'subcategories' )->text() );
- $r .= "\n";
+ $r .= "<div id=\"mw-subcategories\">\n";
+ $r .= '<h2>' . $this->msg( 'subcategories' )->parse() . "</h2>\n";
$r .= $countmsg;
$r .= $this->getSectionPagingLinks( 'subcat' );
$r .= $this->formatList( $this->children, $this->children_start_char );
$r .= $this->getSectionPagingLinks( 'subcat' );
- $r .= "\n";
- $r .= Html::closeElement( 'div' );
+ $r .= "\n</div>";
}
return $r;
}
$countmsg = $this->getCountMessage( $rescnt, $dbcnt, 'article' );
if ( $rescnt > 0 ) {
- $r .= Html::openElement( 'div', array( 'id' => 'mw-pages' ) );
- $r .= "\n";
- $r .= Html::element( 'h2', array(), $this->msg( 'category_header', $ti )->text() );
- $r .= "\n";
+ $r = "<div id=\"mw-pages\">\n";
+ $r .= '<h2>' . $this->msg( 'category_header', $ti )->parse() . "</h2>\n";
$r .= $countmsg;
$r .= $this->getSectionPagingLinks( 'page' );
$r .= $this->formatList( $this->articles, $this->articles_start_char );
$r .= $this->getSectionPagingLinks( 'page' );
- $r .= "\n";
- $r .= Html::closeElement( 'div' );
+ $r .= "\n</div>";
}
return $r;
}
* TODO: Take the headers into account when creating columns, so they're
* more visually equal.
*
+ * More distant TODO: Scrap this and use CSS columns, whenever IE finally
+ * supports those.
+ *
* @param array $articles
* @param string[] $articles_start_char
* @return string
# Split into three columns
$columns = array_chunk( $columns, ceil( count( $columns ) / 3 ), true /* preserve keys */ );
- $ret = Html::openElement( 'div', array( 'class' => 'mw-category' ) );
+ $ret = '<table style="width: 100%;"><tr style="vertical-align: top;">';
$prevchar = null;
foreach ( $columns as $column ) {
+ $ret .= '<td style="width: 33.3%;">';
$colContents = array();
# Kind of like array_flip() here, but we keep duplicates in an
# Change space to non-breaking space to keep headers aligned
$h3char = $char === ' ' ? ' ' : htmlspecialchars( $char );
- $ret .= Html::openElement( 'h3' ) . $h3char;
+ $ret .= '<h3>' . $h3char;
if ( $first && $char === $prevchar ) {
# We're continuing a previous chunk at the top of a new
# column, so add " cont." after the letter.
$ret .= ' ' . wfMessage( 'listingcontinuesabbrev' )->escaped();
}
- $ret .= Html::closeElement( 'h3' )."\n";
+ $ret .= "</h3>\n";
- $ret .= Html::openElement('ul').Html::openElement('li');
- $ret .= implode( Html::element( 'li' ), $articles );
- $ret .= Html::closeElement('ul').Html::closeElement('li');
+ $ret .= '<ul><li>';
+ $ret .= implode( "</li>\n<li>", $articles );
+ $ret .= '</li></ul>';
$first = false;
$prevchar = $char;
}
- $ret .= "\n";
+ $ret .= "</td>\n";
}
- $ret .= Html::closeElement( 'div' );
+ $ret .= '</tr></table>';
return $ret;
}