diff options
author | julia.kirschenheuter <julia.kirschenheuter@nextcloud.com> | 2023-09-22 09:15:36 +0200 |
---|---|---|
committer | julia.kirschenheuter <julia.kirschenheuter@nextcloud.com> | 2023-09-28 18:18:40 +0200 |
commit | 56930920538e045716a0b649213b418da19e2766 (patch) | |
tree | 1104148e61504e9a14b4fcb0ad99754e7a060729 /apps | |
parent | 45cac164322d6ce4d10db07b9207b7079694e2a4 (diff) | |
download | nextcloud-server-56930920538e045716a0b649213b418da19e2766.tar.gz nextcloud-server-56930920538e045716a0b649213b418da19e2766.zip |
Split list to navigation for the left sidebar
Signed-off-by: julia.kirschenheuter <julia.kirschenheuter@nextcloud.com>
Diffstat (limited to 'apps')
-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']); ?> |