/**
* @param $out OutputPage
*/
- function setupSkinUserCss( OutputPage $out ){
+ function setupSkinUserCss( OutputPage $out ) {
$out->addModuleStyles( 'mediawiki.legacy.shared' );
$out->addModuleStyles( 'mediawiki.legacy.oldshared' );
$out->addModuleStyles( 'skins.cologneblue' );
/**
* Language/charset variant links for classic-style skins
* @return string
- *
- * @fixed
*/
function variantLinks() {
$s = array();
return $this->getSkin()->getLanguage()->pipeList( $s );
}
- // @fixed
function otherLanguages() {
global $wgHideInterlanguageLinks;
if ( $wgHideInterlanguageLinks ) {
. $this->getSkin()->getLanguage()->pipeList( $s );
}
- // @fixed
function pageTitleLinks() {
$s = array();
$footlinks = $this->getFooterLinks();
* @param $message string Key of the message to use in place of standard text
*
* @return string
- * @fixed
*/
function processBottomLink( $key, $navlink, $message=null ) {
if ( !$navlink ) {
return $this->makeListItem( $key, $this->processNavlinkForDocument( $navlink ), array( 'tag' => 'span' ) );
}
- // @fixed
function bottomLinks() {
$toolbox = $this->getToolbox();
$content_nav = $this->data['content_navigation'];
return implode( array_filter( $lines ), "<br />\n" ) . "<br />\n";
}
- // @fixed
function talkLink() {
$title = $this->getSkin()->getTitle();
/**
* @return string
- *
- * @fixed
*/
function beforeContent() {
ob_start();
?>
<div id="content">
<div id="topbar">
- <p id="sitetitle">
+ <p id="sitetitle" role="banner">
<a href="<?php echo htmlspecialchars( $this->data['nav_urls']['mainpage']['href'] ) ?>">
<?php echo wfMessage( 'sitetitle' )->escaped() ?>
</a>
</p>
<p id="sitesub"><?php echo wfMessage( 'sitesubtitle' )->escaped() ?></p>
- <div id="toplinks">
- <p id="syslinks"><?php echo $this->sysLinks() ?></p>
- <p id="variantlinks"><?php echo $this->variantLinks() ?></p>
- </div>
- <div id="linkcollection">
+ <div id="linkcollection" role="navigation">
<div id="langlinks"><?php echo str_replace( '<br />', '', $this->otherLanguages() ) ?></div>
<?php echo $this->getSkin()->getCategories() ?>
<div id="titlelinks"><?php echo $this->pageTitleLinks() ?></div>
<?php } ?>
</div>
</div>
- <div id="article">
+ <div id="article" role="main">
<?php if ( $this->getSkin()->getSiteNotice() ) { ?>
<div id="siteNotice"><?php echo $this->getSkin()->getSiteNotice() ?></div>
<?php } ?>
- <h1 id="firstHeading"><span dir="auto"><?php echo $this->data['title'] ?></span></h1>
+ <h1 id="firstHeading" lang="<?php
+ $this->data['pageLanguage'] = $this->getSkin()->getTitle()->getPageViewLanguage()->getCode();
+ $this->html( 'pageLanguage' );
+ ?>"><span dir="auto"><?php echo $this->data['title'] ?></span></h1>
<?php if ( $this->translator->translate( 'tagline' ) ) { ?>
<p class="tagline"><?php echo htmlspecialchars( $this->translator->translate( 'tagline' ) ) ?></p>
<?php } ?>
/**
* @return string
- *
- * @fixed
*/
function afterContent() {
ob_start();
?>
</div>
- <div id='footer'>
+ <div id="footer" role="contentinfo">
<?php
// Page-related links
echo $this->bottomLinks();
?>
</div>
</div>
-<?php echo $this->quickBar() ?>
+<div id="mw-navigation">
+ <h2><?php echo wfMessage( 'navigation-heading' )->escaped() ?></h2>
+ <div id="toplinks" role="navigation">
+ <p id="syslinks"><?php echo $this->sysLinks() ?></p>
+ <p id="variantlinks"><?php echo $this->variantLinks() ?></p>
+ </div>
+ <?php echo $this->quickBar() ?>
+</div>
<?php
$s = ob_get_contents();
ob_end_clean();
/**
* @return string
- *
- * @fixed
*/
function sysLinks() {
$s = array(
*
* @param $bar sidebar data
* @return array modified sidebar data
- *
- * @fixed
*/
function sidebarAdditions( $bar ) {
// "This page" and "Edit" menus
$qbmyoptions[$key] = null;
}
- $bar['qbedit'] = $qbedit;
- $bar['qbpageoptions'] = $qbpageoptions;
- $bar['qbmyoptions'] = $qbmyoptions;
+ // Use the closest reasonable name
+ $bar['cactions'] = $qbedit;
+ $bar['pageoptions'] = $qbpageoptions; // this is a non-standard portlet name, but nothing fits
+ $bar['personal'] = $qbmyoptions;
return $bar;
}
* @access private
*
* @return string
- *
- * @fixed
*/
function quickBar() {
// Massage the sidebar. We want to:
$bar = array();
foreach ( $orig_bar as $heading => $data ) {
if ( $heading == 'SEARCH' ) {
- $bar['qbfind'] = $this->searchForm( 'sidebar' );
+ $bar['search'] = $this->searchForm( 'sidebar' );
} elseif ( $heading == 'TOOLBOX' ) {
- $bar['toolbox'] = $this->getToolbox();
- } elseif ( $heading == 'navigation' ) {
- // Use the navigation heading from standard sidebar as the "browse" section
- $bar['qbbrowse'] = $data;
+ $bar['tb'] = $this->getToolbox();
} else {
$bar[$heading] = $data;
}
// Output the sidebar
+ // CologneBlue uses custom messages for some portlets, but we should keep the ids for consistency
+ $idToMessage = array(
+ 'search' => 'qbfind',
+ 'navigation' => 'qbbrowse',
+ 'tb' => 'toolbox',
+ 'cactions' => 'qbedit',
+ 'personal' => 'qbmyoptions',
+ 'pageoptions' => 'qbpageoptions',
+ );
+
$s = "<div id='quickbar'>\n";
foreach ( $bar as $heading => $data ) {
- $headingMsg = wfMessage( $heading );
- $headingHTML = "<h6>" . ( $headingMsg->exists() ? $headingMsg->escaped() : htmlspecialchars( $heading ) ) . "</h6>";
$portletId = Sanitizer::escapeId( "p-$heading" );
+ $headingMsg = wfMessage( $idToMessage[$heading] ? $idToMessage[$heading] : $heading );
+ $headingHTML = "<h3>" . ( $headingMsg->exists() ? $headingMsg->escaped() : htmlspecialchars( $heading ) ) . "</h3>";
$listHTML = "";
if ( is_array( $data ) ) {
}
if ( $listHTML ) {
- $s .= "<div class=\"portlet\" id=\"$portletId\">\n$headingHTML\n$listHTML\n</div>\n";
+ $role = ( $heading == 'search' ) ? 'search' : 'navigation';
+ $s .= "<div class=\"portlet\" id=\"$portletId\" role=\"$role\">\n$headingHTML\n$listHTML\n</div>\n";
}
}
/**
* @param $label string
* @return string
- *
- * @fixed
*/
function searchForm( $which ) {
global $wgUseTwoButtonsSearchForm;