diff options
Diffstat (limited to 'apps/files/templates/appnavigation.php')
-rw-r--r-- | apps/files/templates/appnavigation.php | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/apps/files/templates/appnavigation.php b/apps/files/templates/appnavigation.php index 56a84edf3b6..1302225c919 100644 --- a/apps/files/templates/appnavigation.php +++ b/apps/files/templates/appnavigation.php @@ -5,7 +5,7 @@ $pinned = 0; foreach ($_['navigationItems'] as $item) { - $pinned = NavigationListElements($item, $pinned, $l); + $pinned = NavigationListElements($item, $l, $pinned); } ?> @@ -58,18 +58,18 @@ * Prints the HTML for a single Entry. * * @param $item The item to be added - * @param $pinned IntegerValue to count the pinned entries at the bottom * @param $l Translator + * @param $pinned IntegerValue to count the pinned entries at the bottom * * @return int Returns the pinned value */ -function NavigationListElements($item, $pinned, $l) { +function NavigationListElements($item, $l, $pinned) { strpos($item['classes'], 'pinned') !== false ? $pinned++ : ''; ?> <li <?php if (isset($item['sublist'])){ ?>id="button-collapse-parent-<?php p($item['id']); ?>"<?php } ?> data-id="<?php p(isset($item['href']) ? $item['href'] : $item['id']) ?> " class="nav-<?php p($item['id']) ?> <?php p($item['classes']) ?> <?php p($pinned === 1 ? 'first-pinned' : '') ?> <?php if ($item['defaultExpandedState'] === 'true') { ?> open<?php } ?>" - <?php if (isset($item['folderPosition'])) { ?> folderPos="<?php p($item['folderPosition']); ?>" <?php } ?>> + <?php if (isset($item['folderPosition'])) { ?> folderposition="<?php p($item['folderPosition']); ?>" <?php } ?>> <a href="<?php p(isset($item['href']) ? $item['href'] : '#') ?>" class="nav-icon-<?php p($item['icon'] !== '' ? $item['icon'] : $item['id']) ?> svg"><?php p($item['name']); ?></a> @@ -80,11 +80,11 @@ function NavigationListElements($item, $pinned, $l) { if (isset($item['sublist'])) { ?> <button id="button-collapse-<?php p($item['id']); ?>" - class="collapse"></button> - <ul id="sublist-<?php p($item['id']); ?>" <?php if ($item['draggableSublist'] === 'true') { ?> draggable="true"<?php } ?>> + class="collapse" <?php if (sizeof($item['sublist']) == 0) { ?> style="display: none" <?php } ?>></button> + <ul id="sublist-<?php p($item['id']); ?>" <?php if ($item['draggableSublist'] === 'true') { ?> draggable="true" style="resize: none;"<?php } ?>> <?php foreach ($item['sublist'] as $item) { - $pinned = NavigationListElements($item, $pinned, $l); + $pinned = NavigationListElements($item, $l, $pinned); } ?> </ul> |