);
if ( $res->numRows() > 0 ) {
- $out = Xml::openElement( 'ul', array( 'class' => 'mw-allpages-chunk' ) );
+ $out = Html::openElement( 'div', array( 'class' => 'mw-allpages-body' ) );
+ $out .= Html::openElement( 'ul', array( 'class' => 'mw-allpages-chunk' ) );
+
while ( ( $n < $this->maxPerPage ) && ( $s = $res->fetchObject() ) ) {
$t = Title::newFromRow( $s );
if ( $t ) {
}
$n++;
}
- $out .= Xml::closeElement( 'ul' );
+ $out .= Html::closeElement( 'ul' );
+ $out .= Html::closeElement( 'div' );
} else {
$out = '';
}
protected $hideRedirects = false;
- // number of columns in output table
- protected $columns = 3;
-
// Inherit $maxPerPage
function __construct() {
$namespace = (int)$ns; // if no namespace given, use 0 (NS_MAIN).
$this->hideRedirects = $request->getBool( 'hideredirects', $this->hideRedirects );
$this->stripPrefix = $request->getBool( 'stripprefix', $this->stripPrefix );
- $this->columns = $request->getInt( 'columns', $this->columns );
$namespaces = $wgContLang->getNamespaces();
$out->setPageTitle(
$n = 0;
if ( $res->numRows() > 0 ) {
- $out = Xml::openElement( 'table', array( 'class' => 'mw-prefixindex-list-table' ) );
+ $out = Html::openElement( 'div', array( 'class' => 'mw-prefixindex-body' ) );
+ $out .= Html::openElement( 'ul', array( 'class' => 'mw-prefixindex-list' ) );
$prefixLength = strlen( $prefix );
while ( ( $n < $this->maxPerPage ) && ( $s = $res->fetchObject() ) ) {
} else {
$link = '[[' . htmlspecialchars( $s->page_title ) . ']]';
}
- if ( $n % $this->columns == 0 ) {
- $out .= '<tr>';
- }
- $out .= "<td>$link</td>";
+
+ $out .= "<li> $link </li>\n";
$n++;
- if ( $n % $this->columns == 0 ) {
- $out .= '</tr>';
- }
- }
- if ( $n % $this->columns != 0 ) {
- $out .= '</tr>';
}
-
- $out .= Xml::closeElement( 'table' );
+ $out .= Html::closeElement( 'ul' );
+ $out .= Html::closeElement( 'div' );
} else {
$out = '';
}
'prefix' => $prefix,
'hideredirects' => $this->hideRedirects,
'stripprefix' => $this->stripPrefix,
- 'columns' => $this->columns,
);
if ( $namespace || $prefix == '' ) {
background-color: #b1ffb1;
}
+/* Common for Special:Allpages and Special:PrefixIndex */
+.mw-allpages-body, .mw-prefixindex-body {
+ columns: 22em 3;
+ -moz-columns: 22em 3;
+ -webkit-columns: 22em 3;
+ break-inside: avoid-column;
+ page-break-inside: avoid;
+ -webkit-column-break-inside: avoid;
+}
+.allpagesredirect {
+ font-style: italic;
+}
+
/* Special:Allpages */
+.mw-allpages-nav {
+ text-align: right;
+ margin-bottom: 1em;
+}
table.mw-allpages-table-form {
width: 100%;
}
table.mw-allpages-table-form tr {
vertical-align: top;
}
-.mw-allpages-nav {
+
+/* Special:Prefixindex */
+.mw-prefixindex-nav {
text-align: right;
- margin-bottom: 1em;
}
-
-ul.mw-allpages-chunk {
- margin: 0;
- padding: 0;
+table#mw-prefixindex-nav-table {
+ width: 100%;
}
-ul.mw-allpages-chunk li {
- border-top: 1px solid #ccc;
- display: inline-block;
- margin: 0 1% 0 0;
- padding: .2em 0;
+td#mw-prefixindex-nav-form {
+ margin-bottom: 1em;
vertical-align: top;
- width: 31%;
-}
-.allpagesredirect {
- font-style: italic;
}
/* Special:Block */
.mw-uctop {
font-weight: bold;
}
+.mw-contributions-form select {
+ vertical-align: middle;
+}
/* Special:EditWatchlist */
.watchlistredir {
text-decoration: line-through;
}
-/* Special:Prefixindex */
-table.mw-prefixindex-list-table,
-table#mw-prefixindex-nav-table {
- width: 100%;
-}
-td#mw-prefixindex-nav-form {
- margin-bottom: 1em;
- vertical-align: top;
-}
-.mw-prefixindex-nav {
- text-align: right;
-}
-
/* Special:RevisionDelete */
p.mw-revdel-editreasons {
font-size: 90%;
font-size: 90%;
text-align: right;
}
-
-/* Special:Contributions */
-.mw-contributions-form select {
- vertical-align: middle;
-}
!! wikitext
{{Special:Prefixindex/Xyzzyx}}
!! html
-<table class="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
+<div class="mw-prefixindex-body"><ul class="mw-prefixindex-list"><li> <a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a> </li>
+</ul></div>
!! end
{{Special:Prefixindex/Xyzzyx}}
{{Special:Prefixindex/Xyzzyx}}
!! html
-<table class="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
-<table class="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table>
+<div class="mw-prefixindex-body"><ul class="mw-prefixindex-list"><li> <a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a> </li>
+</ul></div>
+<div class="mw-prefixindex-body"><ul class="mw-prefixindex-list"><li> <a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a> </li>
+</ul></div>
!! end