Skip to content

Commit d1f5b9f

Browse files
committed
Merge remote-tracking branch 'origin/MAGETWO-33618-Redirect-To-Config-Dashboard' into develop
2 parents 69ffa37 + 3d512c1 commit d1f5b9f

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

app/code/Magento/Backend/Block/Dashboard.php

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,22 @@ protected function _prepareLayout()
3131

3232
$this->addChild('sales', 'Magento\Backend\Block\Dashboard\Sales');
3333

34-
if ($this->_scopeConfig->getValue(self::XML_PATH_ENABLE_CHARTS, \Magento\Store\Model\ScopeInterface::SCOPE_STORE)) {
34+
$isChartEnabled = $this->_scopeConfig->getValue(
35+
self::XML_PATH_ENABLE_CHARTS,
36+
\Magento\Store\Model\ScopeInterface::SCOPE_STORE
37+
);
38+
if ($isChartEnabled) {
3539
$block = $this->getLayout()->createBlock('Magento\Backend\Block\Dashboard\Diagrams');
3640
} else {
3741
$block = $this->getLayout()->createBlock(
3842
'Magento\Backend\Block\Template'
3943
)->setTemplate(
4044
'dashboard/graph/disabled.phtml'
4145
)->setConfigUrl(
42-
$this->getUrl('adminhtml/system_config/edit', ['section' => 'admin'])
46+
$this->getUrl(
47+
'adminhtml/system_config/edit',
48+
['section' => 'admin', '_fragment' => 'admin_dashboard-link']
49+
)
4350
);
4451
}
4552
$this->setChild('diagrams', $block);

0 commit comments

Comments
 (0)