/
tabs.phtml
64 lines (57 loc) · 2.63 KB
/
tabs.phtml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<?php
/**
* Copyright © 2015 Magento. All rights reserved.
* See COPYING.txt for license details.
*/
// @codingStandardsIgnoreFile
/** @var $block \Magento\Config\Block\System\Config\Tabs */
?>
<?php if ($block->getTabs()): ?>
<div id="<?php /* @escapeNotVerified */ echo $block->getId() ?>" class="config-nav">
<?php
/** @var $_tab \Magento\Config\Model\Config\Structure\Element\Tab */
foreach ($block->getTabs() as $_tab):
?>
<?php
$activeCollapsible = false;
foreach ($_tab->getChildren() as $_section) {
if ($block->isSectionActive($_section)) {
$activeCollapsible = true;
}
}
?>
<div class="config-nav-block admin__page-nav _collapsed
<?php if ($_tab->getClass()): ?>
<?php /* @escapeNotVerified */ echo $_tab->getClass() ?>
<?php endif ?>"
data-mage-init='{"collapsible":{"active": "<?php /* @escapeNotVerified */ echo $activeCollapsible;?>",
"openedState": "_show",
"closedState": "_hide",
"collapsible": true,
"animate": 200}}'>
<div class="admin__page-nav-title title _collapsible" data-role="title">
<strong><?php /* @escapeNotVerified */ echo $_tab->getLabel() ?></strong>
</div>
<ul class="admin__page-nav-items items" data-role="content">
<?php $_iterator = 1; ?>
<?php
/** @var $_section \Magento\Config\Model\Config\Structure\Element\Section */
foreach ($_tab->getChildren() as $_section): ?>
<li class="admin__page-nav-item item
<?php /* @escapeNotVerified */ echo $_section->getClass() ?>
<?php if ($block->isSectionActive($_section)): ?> _active<?php endif ?>
<?php echo $_tab->getChildren()->isLast($_section) ? ' _last' : '' ?>">
<a href="<?php /* @escapeNotVerified */ echo $block->getSectionUrl($_section) ?>"
class="admin__page-nav-link item-nav">
<span><?php /* @escapeNotVerified */ echo $_section->getLabel() ?></span>
</a>
</li>
<?php $_iterator++; ?>
<?php endforeach; ?>
</ul>
</div>
<?php
endforeach;
?>
</div>
<?php endif; ?>