diff options
author | Julia Kirschenheuter <6078378+JuliaKirschenheuter@users.noreply.github.com> | 2023-09-29 08:38:14 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-29 08:38:14 +0200 |
commit | f8f437072ac13a4556dea18219d55f11466497e5 (patch) | |
tree | 4c70a22d8d5119338ceb6452b6800dc90edb31ac /apps/settings | |
parent | cfda046260cf805d798a9e29dd849f20de732794 (diff) | |
parent | 56930920538e045716a0b649213b418da19e2766 (diff) | |
download | nextcloud-server-f8f437072ac13a4556dea18219d55f11466497e5.tar.gz nextcloud-server-f8f437072ac13a4556dea18219d55f11466497e5.zip |
Merge pull request #40576 from nextcloud/fix/36915-_The_page_only_has_one_h1_heading
Split list to navigation for the left sidebar
Diffstat (limited to 'apps/settings')
-rw-r--r-- | apps/settings/templates/settings/frame.php | 100 |
1 files changed, 51 insertions, 49 deletions
diff --git a/apps/settings/templates/settings/frame.php b/apps/settings/templates/settings/frame.php index b2b2f04ebe0..68f105d4ca2 100644 --- a/apps/settings/templates/settings/frame.php +++ b/apps/settings/templates/settings/frame.php @@ -29,58 +29,60 @@ script('files', 'jquery.fileupload'); ?> -<div id="app-navigation" role="navigation"> - <ul tabindex="0"> - <?php if (!empty($_['forms']['admin'])) { ?> - <li class="app-navigation-caption"><?php p($l->t('Personal')); ?></li> - <?php - } - foreach ($_['forms']['personal'] as $form) { - if (isset($form['anchor'])) { - $anchor = \OC::$server->getURLGenerator()->linkToRoute('settings.PersonalSettings.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="personal"> - <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 +<div id="app-navigation"> + <?php if (!empty($_['forms']['admin'])): ?> + <div id="app-navigation-caption-personal" class="app-navigation-caption"><?php p($l->t('Personal')); ?></div> + <?php endif; ?> + <nav class="app-navigation-personal" aria-labelledby="app-navigation-caption-personal"> + <ul tabindex="0"> + <?php foreach ($_['forms']['personal'] as $form) { + if (isset($form['anchor'])) { + $anchor = \OC::$server->getURLGenerator()->linkToRoute('settings.PersonalSettings.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="personal"> + <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 + } } - } - ?> - - <?php - if (!empty($_['forms']['admin'])) { ?> - <li class="app-navigation-caption"><?php p($l->t('Administration')); ?></li> - <?php - } - foreach ($_['forms']['admin'] as $form) { - if (isset($form['anchor'])) { - $anchor = \OC::$server->getURLGenerator()->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 if (!empty($_['forms']['admin'])): ?> + <div id="app-navigation-caption-administration" class="app-navigation-caption"><?php p($l->t('Administration')); ?></div> + <?php endif; ?> + <nav class="app-navigation-administration" aria-labelledby="app-navigation-caption-administration"> + <ul tabindex="0"> + <?php foreach ($_['forms']['admin'] as $form) { + if (isset($form['anchor'])) { + $anchor = \OC::$server->getURLGenerator()->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> + ?> + </ul> + </nav> </div> <div id="app-content" tabindex="0" data-active-section-id="<?php print_unescaped($_['activeSectionId']) ?>"> <?php print_unescaped($_['content']); ?> |