Skip to content

Commit 5a5091c

Browse files
committed
Fixed 24990 link not to redirect to dashboard
1 parent 9400c1e commit 5a5091c

File tree

2 files changed

+17
-4
lines changed

2 files changed

+17
-4
lines changed

setup/src/Magento/Setup/Controller/Navigation.php

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
use Zend\View\Model\JsonModel;
1111
use Zend\View\Model\ViewModel;
1212
use Magento\Setup\Model\Cron\Status;
13+
use Magento\Setup\Model\ObjectManagerProvider;
1314

1415
/**
1516
* Class Navigation
@@ -32,14 +33,20 @@ class Navigation extends AbstractActionController
3233
*/
3334
protected $view;
3435

36+
/**
37+
* @var ObjectManagerProvider $objectManagerProvider
38+
*/
39+
protected $objectManagerProvider;
40+
3541
/**
3642
* @param NavModel $navigation
3743
* @param Status $status
3844
*/
39-
public function __construct(NavModel $navigation, Status $status)
45+
public function __construct(NavModel $navigation, Status $status, ObjectManagerProvider $objectManagerProvider)
4046
{
4147
$this->navigation = $navigation;
4248
$this->status = $status;
49+
$this->objectManagerProvider = $objectManagerProvider;
4350
$this->view = new ViewModel;
4451
$this->view->setVariable('menu', $this->navigation->getMenuItems());
4552
$this->view->setVariable('main', $this->navigation->getMainItems());
@@ -75,8 +82,12 @@ public function menuAction()
7582
*/
7683
public function sideMenuAction()
7784
{
85+
/** @var \Magento\Backend\Model\UrlInterface $backendUrl */
86+
$backendUrl = $this->objectManagerProvider->get()->get(\Magento\Backend\Model\UrlInterface::class);
87+
7888
$this->view->setTemplate('/magento/setup/navigation/side-menu.phtml');
7989
$this->view->setVariable('isInstaller', $this->navigation->getType() == NavModel::NAV_INSTALLER);
90+
$this->view->setVariable('backendUrl', $backendUrl->getRouteUrl('adminhtml'));
8091
$this->view->setTerminal(true);
8192
return $this->view;
8293
}

setup/view/magento/setup/navigation/side-menu.phtml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,11 @@
2020
ng-show="<?= implode( '&&', $expressions) ?>"
2121
>
2222
<nav class="admin__menu" ng-controller="mainController">
23-
<span class="logo logo-static" data-edition="Community Edition">
24-
<img class="logo-img" src="<?= $this->basePath() ?>/pub/images/logo.svg" alt="Magento Admin Panel">
25-
</span>
23+
<a href="<?= $this->backendUrl ?>" class="logo" data-edition="Community Edition">
24+
<span>
25+
<img class="logo-img" src="<?= $this->basePath() ?>/pub/images/logo.svg" alt="Magento Admin Panel">
26+
</span>
27+
</a>
2628
<ul id="nav" role="menubar">
2729
<li class="item-home level-0" ng-class="{_active: $state.current.name === 'root.home'}">
2830
<a href="" ui-sref="root.home">

0 commit comments

Comments
 (0)