tabs.phtml 2.6 KB

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