2020-07-26 15:49:05 +02:00
|
|
|
<nav id="book-tree"
|
|
|
|
class="book-tree mb-xl"
|
|
|
|
aria-label="{{ trans('entities.books_navigation') }}">
|
|
|
|
|
2018-12-09 17:51:31 +01:00
|
|
|
<h5>{{ trans('entities.books_navigation') }}</h5>
|
2017-08-26 16:41:33 +02:00
|
|
|
|
2019-03-30 16:15:01 +01:00
|
|
|
<ul class="sidebar-page-list mt-xs menu entity-list">
|
|
|
|
@if (userCan('view', $book))
|
|
|
|
<li class="list-item-book book">
|
|
|
|
@include('partials.entity-list-item-basic', ['entity' => $book, 'classes' => ($current->matches($book)? 'selected' : '')])
|
|
|
|
</li>
|
|
|
|
@endif
|
2017-08-26 16:41:33 +02:00
|
|
|
|
2018-11-11 14:11:36 +01:00
|
|
|
@foreach($sidebarTree as $bookChild)
|
|
|
|
<li class="list-item-{{ $bookChild->getClassName() }} {{ $bookChild->getClassName() }} {{ $bookChild->isA('page') && $bookChild->draft ? 'draft' : '' }}">
|
|
|
|
@include('partials.entity-list-item-basic', ['entity' => $bookChild, 'classes' => $current->matches($bookChild)? 'selected' : ''])
|
2017-08-26 16:41:33 +02:00
|
|
|
|
2018-11-11 14:11:36 +01:00
|
|
|
@if($bookChild->isA('chapter') && count($bookChild->pages) > 0)
|
2019-03-30 16:15:01 +01:00
|
|
|
<div class="entity-list-item no-hover">
|
2019-08-24 19:26:28 +02:00
|
|
|
<span role="presentation" class="icon text-chapter"></span>
|
2019-03-30 16:15:01 +01:00
|
|
|
<div class="content">
|
2019-08-24 19:26:28 +02:00
|
|
|
@include('chapters.child-menu', [
|
|
|
|
'chapter' => $bookChild,
|
|
|
|
'current' => $current,
|
|
|
|
'isOpen' => $bookChild->matchesOrContains($current)
|
|
|
|
])
|
2019-03-30 16:15:01 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2018-11-11 14:11:36 +01:00
|
|
|
@endif
|
2017-08-26 16:41:33 +02:00
|
|
|
|
2018-11-11 14:11:36 +01:00
|
|
|
</li>
|
|
|
|
@endforeach
|
|
|
|
</ul>
|
2019-08-25 16:44:51 +02:00
|
|
|
</nav>
|