Pwirth has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/344630 )
Change subject: BSFoundation: Moved toolbox from navigation to content actions #5786 ...................................................................... BSFoundation: Moved toolbox from navigation to content actions #5786 Change-Id: I58467f38b8d27c0c6f2d830d31f1638f91470855 --- M includes/skins/BsBaseTemplate.php 1 file changed, 28 insertions(+), 12 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceFoundation refs/changes/30/344630/1 diff --git a/includes/skins/BsBaseTemplate.php b/includes/skins/BsBaseTemplate.php index 95a0ddb..4a47159 100644 --- a/includes/skins/BsBaseTemplate.php +++ b/includes/skins/BsBaseTemplate.php @@ -206,6 +206,7 @@ $variants = $this->data['content_navigation']['variants']; //Not used at the moment $views = $this->data['content_navigation']['views']; $actions = $this->data['content_navigation']['actions']; + $aTools = $this->getToolbox(); ?> <div id='left-navigation'> <div id="p-namespaces" role="navigation" class="<?php if ( count( $namespaces ) == 0 ) { echo ' emptyPortlet'; } ?>" aria-labelledby="p-namespaces-label"> @@ -241,7 +242,19 @@ <ul<?php $this->html( 'userlangattributes' ) ?> class="bs-personal-menu"> <?php foreach ( $actions as $key => $item){ echo $this->makeListItem( $key, $item ); - }?> + } + //toolbox items to "more" content actions menu #5786 + foreach( $aTools as $sKey => $aItem ) { + //make sure to have a new unique id related to + //content actions + $aItem['id'] = "ca-$sKey"; + if( empty($aItem['class']) ) { + $aItem['class'] = ''; + } + $aItem['class'] .= " ca-toolbox-item"; + echo $this->makeListItem( $sKey, $aItem ); + } + ?> </ul> </div> </li> @@ -309,17 +322,21 @@ } public function getToolbox() { - $baseToolbox = parent::getToolbox(); + $aToolbox = parent::getToolbox(); + //Remove some toolbox items, cause they are shown elsewhere. #5786 + $aUnsetItems = [ + 'print', + 'upload', + 'specialpages', + ]; + foreach( $aUnsetItems as $sItem ) { + if( !isset( $aToolbox[$sItem] ) ) { + continue; + } + unset( $aToolbox[$sItem] ); + } - // adding link to Allpages - $oAllPages = SpecialPageFactory::getPage( 'Allpages' ); - $baseToolbox['specialpageallpages'] = array( - 'href' => $oAllPages->getTitle()->getLinkURL(), - 'text' => $oAllPages->getDescription(), - 'id' => 't-allpages' - ); - - return $baseToolbox; + return $aToolbox; } // introduced in MediaWiki 1.23 @@ -371,7 +388,6 @@ $aOut = array(); if ( $bar == 'TOOLBOX' ) { - $aPortlets[$bar] = $this->getToolboxMarkUp(); continue; } if ( $cont ) { -- To view, visit https://gerrit.wikimedia.org/r/344630 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I58467f38b8d27c0c6f2d830d31f1638f91470855 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/BlueSpiceFoundation Gerrit-Branch: master Gerrit-Owner: Pwirth <wi...@hallowelt.biz> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits