mirror of
https://github.com/nextcloud/server.git
synced 2026-04-15 22:11:17 -04:00
Merge pull request #59428 from nextcloud/fix/settings-sections-32
[stable32] fix(settings): do not show admin section container if empty
This commit is contained in:
commit
3fb0c6f099
1 changed files with 22 additions and 23 deletions
|
|
@ -40,30 +40,29 @@ style('settings', 'settings');
|
|||
|
||||
<?php if (!empty($_['forms']['admin'])): ?>
|
||||
<div id="app-navigation-caption-administration" class="app-navigation-caption"><?php p($l->t('Administration')); ?></div>
|
||||
<nav class="app-navigation-administration" aria-labelledby="app-navigation-caption-administration">
|
||||
<ul>
|
||||
<?php foreach ($_['forms']['admin'] as $form) {
|
||||
if (isset($form['anchor'])) {
|
||||
$anchor = \OCP\Server::get(\OCP\IURLGenerator::class)->linkToRoute('settings.AdminSettings.index', ['section' => $form['anchor']]);
|
||||
$class = 'nav-icon-' . $form['anchor'];
|
||||
$sectionName = $form['section-name']; ?>
|
||||
<li <?php print_unescaped($form['active'] ? ' class="active"' : ''); ?> data-section-id="<?php print_unescaped($form['anchor']); ?>" data-section-type="admin">
|
||||
<a href="<?php p($anchor); ?>"<?php print_unescaped($form['active'] ? ' aria-current="page"' : ''); ?>>
|
||||
<?php if (!empty($form['icon'])) { ?>
|
||||
<img alt="" src="<?php print_unescaped($form['icon']); ?>">
|
||||
<span><?php p($form['section-name']); ?></span>
|
||||
<?php } else { ?>
|
||||
<span class="no-icon"><?php p($form['section-name']); ?></span>
|
||||
<?php } ?>
|
||||
</a>
|
||||
</li>
|
||||
<?php
|
||||
}
|
||||
} ?>
|
||||
</ul>
|
||||
</nav>
|
||||
<?php endif; ?>
|
||||
<nav class="app-navigation-administration" aria-labelledby="app-navigation-caption-administration">
|
||||
<ul>
|
||||
<?php foreach ($_['forms']['admin'] as $form) {
|
||||
if (isset($form['anchor'])) {
|
||||
$anchor = \OCP\Server::get(\OCP\IURLGenerator::class)->linkToRoute('settings.AdminSettings.index', ['section' => $form['anchor']]);
|
||||
$class = 'nav-icon-' . $form['anchor'];
|
||||
$sectionName = $form['section-name']; ?>
|
||||
<li <?php print_unescaped($form['active'] ? ' class="active"' : ''); ?> data-section-id="<?php print_unescaped($form['anchor']); ?>" data-section-type="admin">
|
||||
<a href="<?php p($anchor); ?>"<?php print_unescaped($form['active'] ? ' aria-current="page"' : ''); ?>>
|
||||
<?php if (!empty($form['icon'])) { ?>
|
||||
<img alt="" src="<?php print_unescaped($form['icon']); ?>">
|
||||
<span><?php p($form['section-name']); ?></span>
|
||||
<?php } else { ?>
|
||||
<span class="no-icon"><?php p($form['section-name']); ?></span>
|
||||
<?php } ?>
|
||||
</a>
|
||||
</li>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
<main id="app-content" <?php if (!empty($_['activeSectionId'])) { ?> data-active-section-id="<?php print_unescaped($_['activeSectionId']) ?>" <?php } if (!empty($_['activeSectionType'])) { ?> data-active-section-type="<?php print_unescaped($_['activeSectionType']) ?>" <?php } ?>>
|
||||
<?php print_unescaped($_['content']); ?>
|
||||
|
|
|
|||
Loading…
Reference in a new issue