Njw has submitted this change and it was merged.

Change subject: Add any extra menus added to sidebar to middle column
......................................................................


Add any extra menus added to sidebar to middle column

Change-Id: I50991302a79def85fb373747fbcf084a70b09b14
---
M Erudite.skin.php
1 file changed, 27 insertions(+), 3 deletions(-)

Approvals:
  Njw: Verified; Looks good to me, approved
  jenkins-bot: Verified



diff --git a/Erudite.skin.php b/Erudite.skin.php
index 165fea8..d872421 100644
--- a/Erudite.skin.php
+++ b/Erudite.skin.php
@@ -87,9 +87,9 @@
                        <div id="menu">
                        <ul id="menu-urs" class="menu">
                        <?php
-                               foreach( $this->data['sidebar']['navigation'] 
as $key => $val ) {
-                                       printf( '<li id="menu-item-%s" 
class="menu-item">', Sanitizer::escapeId( $val['id'] ) );
-                                       printf( '<a href="%s">%s</a>', 
htmlspecialchars( $val['href'] ), htmlspecialchars( $val['text'] ) );
+                               foreach( $this->data['sidebar']['navigation'] 
as $item ) {
+                                       printf( '<li id="menu-item-%s" 
class="menu-item">', Sanitizer::escapeId( $item['id'] ) );
+                                       printf( '<a href="%s">%s</a>', 
htmlspecialchars( $item['href'] ), htmlspecialchars( $item['text'] ) );
                                        echo "</li>\n";
                                }
                        ?>
@@ -236,6 +236,30 @@
                                </ul>
                        </li>
 
+                       <?php
+                               foreach( $this->data['sidebar'] as $name => 
$menu ) {
+                                       /* standard menus are already handled 
elsewhere */
+                                       if( empty($menu) ||
+                                           $name == 'navigation' ||
+                                           $name == 'SEARCH' ||
+                                           $name == 'LANGUAGES' ||
+                                           $name == 'TOOLBOX' ) {
+                                               continue;
+                                       }
+                                       echo "<li class='widget'>";
+                                       $msgObj = wfMessage( $name );
+                                       $heading = $msgObj->exists() ? 
$msgObj->text() : $name;
+                                       printf( '<h3>%s</h3>', 
htmlspecialchars( $heading ) );
+                                       echo "<ul>\n";
+                                       foreach( $menu as $item ) {
+                                               printf( '<li><a 
href="%s">%s</a></li>' . "\n",
+                                                       htmlspecialchars( 
$item['href'] ),
+                                                       htmlspecialchars( 
$item['text'] ) );
+                                       }
+                                       echo "</ul></li>\n";
+                               }
+                       ?>
+
                        <li class="widget">
                                <?php echo $this->msgWikiNoEdit( 
'erudite-extracontent-column2' ); ?>
                        </li>

-- 
To view, visit https://gerrit.wikimedia.org/r/98514
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I50991302a79def85fb373747fbcf084a70b09b14
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/skins/erudite
Gerrit-Branch: master
Gerrit-Owner: Njw <nick.wh...@durham.ac.uk>
Gerrit-Reviewer: Njw <nick.wh...@durham.ac.uk>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to