diff options
author | Joas Schilling <coding@schilljs.com> | 2017-01-19 10:34:17 +0100 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2017-01-19 10:42:21 +0100 |
commit | 8c8354399a1923b3580bf887f1f0ab1ef50bc14e (patch) | |
tree | 1134a1732816e7d54ce6909472e366af7bf93b19 /settings/templates | |
parent | 381e58d7d4c5b04f32cdbec813ec2a2d150e09bc (diff) | |
download | nextcloud-server-8c8354399a1923b3580bf887f1f0ab1ef50bc14e.tar.gz nextcloud-server-8c8354399a1923b3580bf887f1f0ab1ef50bc14e.zip |
Allow apps to specify an icon with the sections via the API
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'settings/templates')
-rw-r--r-- | settings/templates/admin/frame.php | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/settings/templates/admin/frame.php b/settings/templates/admin/frame.php index 7ae6b5fa012..2b234f4cd9b 100644 --- a/settings/templates/admin/frame.php +++ b/settings/templates/admin/frame.php @@ -29,18 +29,29 @@ script('files', 'jquery.fileupload'); ?> <div id="app-navigation"> - <ul class="with-icon"> - <?php foreach($_['forms'] as $form) { + <ul> + <?php + foreach($_['forms'] 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']; $active = $form['active'] ? ' class="active"' : ''; - print_unescaped(sprintf("<li%s><a href='%s' class='%s'>%s</a></li>", $active, \OCP\Util::sanitizeHTML($anchor), - \OCP\Util::sanitizeHTML($class), - \OCP\Util::sanitizeHTML($sectionName))); + ?> + <li <?php print_unescaped($form['active'] ? ' class="active"' : ''); ?>> + <a href="<?php p($anchor); ?>"> + <?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> </div> |