2018-10-21 21:05:11 +02:00
|
|
|
<div id="book-tree" class="card book-tree mb-m" v-pre>
|
2018-02-17 14:30:52 +01:00
|
|
|
<h3>@icon('book') {{ trans('entities.books_navigation') }}</h3>
|
2017-08-26 16:41:33 +02:00
|
|
|
<div class="body">
|
|
|
|
<ul class="sidebar-page-list menu">
|
|
|
|
|
|
|
|
@if (userCan('view', $book))
|
2018-02-17 14:30:52 +01:00
|
|
|
<li class="book-header"><a href="{{ $book->getUrl() }}" class="book {{ $current->matches($book)? 'selected' : '' }}">@icon('book'){{$book->name}}</a></li>
|
2017-08-26 16:41:33 +02:00
|
|
|
@endif
|
|
|
|
|
|
|
|
@foreach($sidebarTree as $bookChild)
|
|
|
|
<li class="list-item-{{ $bookChild->getClassName() }} {{ $bookChild->getClassName() }} {{ $bookChild->isA('page') && $bookChild->draft ? 'draft' : '' }}">
|
|
|
|
<a href="{{ $bookChild->getUrl() }}" class="{{ $bookChild->getClassName() }} {{ $current->matches($bookChild)? 'selected' : '' }}">
|
2018-02-17 14:30:52 +01:00
|
|
|
@if($bookChild->isA('chapter'))@icon('chapter')@else @icon('page')@endif{{ $bookChild->name }}
|
2017-08-26 16:41:33 +02:00
|
|
|
</a>
|
|
|
|
|
|
|
|
@if($bookChild->isA('chapter') && count($bookChild->pages) > 0)
|
|
|
|
<p chapter-toggle class="text-muted @if($bookChild->matchesOrContains($current)) open @endif">
|
2018-02-17 20:49:00 +01:00
|
|
|
@icon('caret-right') @icon('page') <span>{{ trans_choice('entities.x_pages', $bookChild->pages->count()) }}</span>
|
2017-08-26 16:41:33 +02:00
|
|
|
</p>
|
|
|
|
<ul class="menu sub-menu inset-list @if($bookChild->matchesOrContains($current)) open @endif">
|
|
|
|
@foreach($bookChild->pages as $childPage)
|
|
|
|
<li class="list-item-page {{ $childPage->isA('page') && $childPage->draft ? 'draft' : '' }}">
|
|
|
|
<a href="{{ $childPage->getUrl() }}" class="page {{ $current->matches($childPage)? 'selected' : '' }}">
|
2018-02-17 14:30:52 +01:00
|
|
|
@icon('page') {{ $childPage->name }}
|
2017-08-26 16:41:33 +02:00
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
@endforeach
|
|
|
|
</ul>
|
|
|
|
@endif
|
|
|
|
|
|
|
|
|
|
|
|
</li>
|
|
|
|
@endforeach
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|