1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2024-10-30 23:52:40 +01:00
BookStack/resources/views/pages/sidebar-tree-list.blade.php
2015-08-16 00:50:27 +01:00

28 lines
1.2 KiB
PHP

<ul class="sidebar-page-list menu">
<li class="book-header"><a href="{{$book->getUrl()}}" class="book"><i class="zmdi zmdi-book"></i>{{$book->name}}</a></li>
@foreach($book->children() as $bookChild)
<li class="list-item-{{is_a($bookChild, 'Oxbow\Chapter') ? 'chapter' : 'page' }}">
<a href="{{$bookChild->getUrl()}}" class="{{is_a($bookChild, 'Oxbow\Chapter') ? 'chapter' : 'page' }}">
@if(is_a($bookChild, 'Oxbow\Chapter'))
<i class="zmdi zmdi-collection-bookmark chapter-toggle"></i>
@else
<i class="zmdi zmdi-file-text"></i>
@endif
{{ $bookChild->name }}
</a>
@if(is_a($bookChild, 'Oxbow\Chapter') && count($bookChild->pages) > 0)
<ul class="menu">
@foreach($bookChild->pages as $page)
<li class="list-item-page">
<a href="{{$page->getUrl()}}" class="page">
<i class="zmdi zmdi-file-text"></i> {{ $page->name }}
</a>
</li>
@endforeach
</ul>
@endif
</li>
@endforeach
</ul>