Skip to content

Commit

Permalink
Fixed 24990 link not to redirect to dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
Usik2203 committed Dec 18, 2019
1 parent 9400c1e commit 5a5091c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
13 changes: 12 additions & 1 deletion setup/src/Magento/Setup/Controller/Navigation.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
use Zend\View\Model\JsonModel;
use Zend\View\Model\ViewModel;
use Magento\Setup\Model\Cron\Status;
use Magento\Setup\Model\ObjectManagerProvider;

/**
* Class Navigation
Expand All @@ -32,14 +33,20 @@ class Navigation extends AbstractActionController
*/
protected $view;

/**
* @var ObjectManagerProvider $objectManagerProvider
*/
protected $objectManagerProvider;

/**
* @param NavModel $navigation
* @param Status $status
*/
public function __construct(NavModel $navigation, Status $status)
public function __construct(NavModel $navigation, Status $status, ObjectManagerProvider $objectManagerProvider)
{
$this->navigation = $navigation;
$this->status = $status;
$this->objectManagerProvider = $objectManagerProvider;
$this->view = new ViewModel;
$this->view->setVariable('menu', $this->navigation->getMenuItems());
$this->view->setVariable('main', $this->navigation->getMainItems());
Expand Down Expand Up @@ -75,8 +82,12 @@ public function menuAction()
*/
public function sideMenuAction()
{
/** @var \Magento\Backend\Model\UrlInterface $backendUrl */
$backendUrl = $this->objectManagerProvider->get()->get(\Magento\Backend\Model\UrlInterface::class);

$this->view->setTemplate('/magento/setup/navigation/side-menu.phtml');
$this->view->setVariable('isInstaller', $this->navigation->getType() == NavModel::NAV_INSTALLER);
$this->view->setVariable('backendUrl', $backendUrl->getRouteUrl('adminhtml'));
$this->view->setTerminal(true);
return $this->view;
}
Expand Down
8 changes: 5 additions & 3 deletions setup/view/magento/setup/navigation/side-menu.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,11 @@
ng-show="<?= implode( '&&', $expressions) ?>"
>
<nav class="admin__menu" ng-controller="mainController">
<span class="logo logo-static" data-edition="Community Edition">
<img class="logo-img" src="<?= $this->basePath() ?>/pub/images/logo.svg" alt="Magento Admin Panel">
</span>
<a href="<?= $this->backendUrl ?>" class="logo" data-edition="Community Edition">
<span>
<img class="logo-img" src="<?= $this->basePath() ?>/pub/images/logo.svg" alt="Magento Admin Panel">
</span>
</a>
<ul id="nav" role="menubar">
<li class="item-home level-0" ng-class="{_active: $state.current.name === 'root.home'}">
<a href="" ui-sref="root.home">
Expand Down

0 comments on commit 5a5091c

Please sign in to comment.