Merge "Add 'contentmodel' to resultproperties in prop=revisions"
[lhc/web/wiklou.git] / skins / CologneBlue.php
index 84042c3..4d18eb5 100644 (file)
@@ -279,17 +279,17 @@ class CologneBlueTemplate extends BaseTemplate {
 ?>
 <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">
+               <div id="toplinks" role="navigation">
                        <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>
@@ -298,11 +298,14 @@ class CologneBlueTemplate extends BaseTemplate {
                        <?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()->getPageLanguage()->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 } ?>
@@ -328,7 +331,7 @@ class CologneBlueTemplate extends BaseTemplate {
                ob_start();
 ?>
        </div>
-       <div id='footer'>
+       <div id="footer" role="contentinfo">
 <?php
                // Page-related links
                echo $this->bottomLinks();
@@ -430,9 +433,10 @@ class CologneBlueTemplate extends BaseTemplate {
                        $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;
        }
@@ -479,12 +483,9 @@ class CologneBlueTemplate extends BaseTemplate {
                $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;
                        }
@@ -492,12 +493,22 @@ class CologneBlueTemplate extends BaseTemplate {
 
 
                // 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 = "<h6>" . ( $headingMsg->exists() ? $headingMsg->escaped() : htmlspecialchars( $heading ) ) . "</h6>";
                        $listHTML = "";
 
                        if ( is_array( $data ) ) {
@@ -517,7 +528,8 @@ class CologneBlueTemplate extends BaseTemplate {
                        }
 
                        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";
                        }
                }