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