* Add information about user group membership to Special:Preferences
* (bug 14146) Wrap usage section on imagepages into <div>s.
* New layout for Special:Specialpages. Restricted pages are marked but not separated
- from other pages in their group. And the page uses css rather than tables to create
- a column layout which grades well in all sizes of browsers.
+ from other pages in their group.
* (bug 14263) Show a diff of the revert on rollback notification page.
* (bug 13434) Show a warning when hash identical files exist
$sk = $wgUser->getSkin();
$pages = SpecialPage::getUsablePages();
-
+
if( count( $pages ) == 0 ) {
# Yeah, that was pointless. Thanks for coming.
return;
}
-
+
/** Put them into a sortable array */
$groups = array();
foreach ( $pages as $page ) {
if( !isset($groups[$group]) ) {
$groups[$group] = array();
}
+ //$groups[$group][$page->getDescription()] = $page->getTitle();
$groups[$group][$page->getDescription()] = array( $page->getTitle(), $page->isRestricted() );
}
}
-
+
/** Sort */
if ( $wgSortSpecialPages ) {
foreach( $groups as $group => $sortedPages ) {
ksort( $groups[$group] );
}
}
-
+
/** Always move "other" to end */
if( array_key_exists('other',$groups) ) {
$other = $groups['other'];
unset( $groups['other'] );
$groups['other'] = $other;
}
-
+
/** Now output the HTML */
$restrictedPages = false;
foreach ( $groups as $group => $sortedPages ) {
+ $middle = ceil( count($sortedPages)/2 );
+ $total = count($sortedPages);
+ $count = 0;
+
$wgOut->addHTML( "<h4 class='mw-specialpagesgroup'>".wfMsgHtml("specialpages-group-$group")."</h4>\n" );
- $wgOut->addHTML( "<ul class='mw-specialpages-section'>" );
- foreach ( $sortedPages as $desc => $specialpage ) {
+ $wgOut->addHTML( "<table style='width: 100%;' class='mw-specialpages-table'><tr>" );
+ $wgOut->addHTML( "<td width='30%' valign='top'><ul>\n" );
+ foreach( $sortedPages as $desc => $specialpage ) {
list( $title, $restricted ) = $specialpage;
$link = $sk->makeKnownLinkObj( $title , htmlspecialchars( $desc ) );
if( $restricted ) {
$wgOut->addHTML( "<li class='mw-specialpages-page mw-specialpagerestricted'>{$link}</li>\n" );
- $restrictedPages = true;
} else {
- $wgOut->addHTML( "<li class='mw-specialpages-page'>{$link}</li>\n" );
+ $wgOut->addHTML( "<li>{$link}</li>\n" );
+ }
+
+ # Split up the larger groups
+ $count++;
+ if( $total > 3 && $count == $middle ) {
+ $wgOut->addHTML( "</ul></td><td width='10%'></td><td width='30%' valign='top'><ul>" );
}
}
- $wgOut->addHTML( "</ul>\n" );
+ $wgOut->addHTML( "</ul></td><td width='30%' valign='top'></td></tr></table>\n" );
}
$wgOut->addHTML(
Xml::openElement('div', array( 'class' => 'mw-specialpages-notes' )).
wfMsgWikiHtml('specialpages-note').
Xml::closeElement('div')
);
-
}
\ No newline at end of file
/* Special:SpecialPages styling */
h4.mw-specialpagesgroup {
- padding: 2px;
background-color: #dcdcdc;
- margin: .3em 0em 0em;
- clear: both;
-}
-.mw-specialpages-section {
- display: block;
- width: 100%;
- clear: both;
-}
-.mw-specialpages-page {
- float: left;
- width: 275px;
- margin: 0em .3em .3em;
+ padding: 2px;
+ margin: .3em 0em 0em 0em;
}
.mw-specialpagerestricted {
display: list-item;
list-style-image: url(images/bullet_star.gif);
}
-.mw-specialpages-notes {
- clear: both;
-}
-
#shared-image-dup, #shared-image-conflict {
font-style: italic;
}