2021-10-18 13:28:26 +02:00
|
|
|
<?php
|
|
|
|
$bookmarkIncluded = $loggedUser->user_settings_by_name_with_fallback['ui.sidebar.include_bookmarks']['value'];
|
|
|
|
?>
|
2021-09-08 14:35:51 +02:00
|
|
|
<div class="sidebar-wrapper d-flex flex-column">
|
2021-09-07 15:51:21 +02:00
|
|
|
<div class="sidebar-scroll">
|
|
|
|
<div class="sidebar-content">
|
|
|
|
<ul class="sidebar-elements">
|
2021-10-08 16:57:38 +02:00
|
|
|
<?php foreach ($menu as $category => $categorized) : ?>
|
|
|
|
<?php if ($category == '__bookmarks') : ?>
|
2021-10-18 13:28:26 +02:00
|
|
|
<?php if ($bookmarkIncluded) : ?>
|
|
|
|
<?= $this->element('layouts/sidebar/category', ['label' => __('Bookmarks'), 'class' => 'bookmark-categ']) ?>
|
|
|
|
<?= $this->element('UserSettings/saved-bookmarks', [
|
|
|
|
'bookmarks' => $categorized,
|
|
|
|
'forSidebar' => true,
|
|
|
|
]) ?>
|
|
|
|
<?php endif; ?>
|
|
|
|
<?php else: ?>
|
2021-10-08 16:57:38 +02:00
|
|
|
<?= $this->element('layouts/sidebar/category', ['label' => $category]) ?>
|
|
|
|
<?php foreach ($categorized as $parentName => $parent) : ?>
|
|
|
|
<?= $this->element('layouts/sidebar/entry', [
|
2022-02-08 17:58:30 +01:00
|
|
|
'parentName' => $parentName,
|
2021-09-07 15:51:21 +02:00
|
|
|
'parent' => $parent,
|
|
|
|
])
|
2021-10-08 16:57:38 +02:00
|
|
|
?>
|
|
|
|
<?php endforeach; ?>
|
|
|
|
<?php endif; ?>
|
2021-09-07 15:51:21 +02:00
|
|
|
<?php endforeach; ?>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|
2021-10-08 16:57:38 +02:00
|
|
|
<span class="lock-sidebar align-self-center mt-auto w-100 d-none d-sm-block">
|
|
|
|
<a type="button" class="btn-lock-sidebar btn btn-sm w-100"></a>
|
2021-09-08 14:35:51 +02:00
|
|
|
</span>
|
2021-10-08 16:57:38 +02:00
|
|
|
</div>
|