]> BookStack Code Mirror - bookstack/blob - resources/views/chapters/list-item.blade.php
Trying to make the tests green.
[bookstack] / resources / views / chapters / list-item.blade.php
1 <div class="chapter entity-list-item" data-entity-type="chapter" data-entity-id="{{$chapter->id}}">
2     <h4>
3         @if (isset($showPath) && $showPath)
4             <a href="{{ $chapter->book->getUrl() }}" class="text-book">
5                 <i class="zmdi zmdi-book"></i>{{ $chapter->book->name }}
6             </a>
7             <span class="text-muted">&nbsp;&nbsp;&raquo;&nbsp;&nbsp;</span>
8         @endif
9         <a href="{{ $chapter->getUrl() }}" class="text-chapter entity-list-item-link">
10             <i class="zmdi zmdi-collection-bookmark"></i><span class="entity-list-item-name">{{ $chapter->name }}</span>
11         </a>
12     </h4>
13     @if(isset($chapter->searchSnippet))
14         <p class="text-muted">{!! $chapter->searchSnippet !!}</p>
15     @else
16         <p class="text-muted">{{ $chapter->getExcerpt() }}</p>
17     @endif
18
19     @if(!isset($hidePages) && count($chapter->pages) > 0)
20         <p class="text-muted chapter-toggle"><i class="zmdi zmdi-caret-right"></i> <i class="zmdi zmdi-file-text"></i> <span>{{ trans('entities.x_pages', ['count' => $chapter->pages->count()]) }}</span></p>
21         <div class="inset-list">
22             @foreach($chapter->pages as $page)
23                 <h5 class="@if($page->draft) draft @endif"><a href="{{ $page->getUrl() }}" class="text-page @if($page->draft) draft @endif"><i class="zmdi zmdi-file-text"></i>{{$page->name}}</a></h5>
24             @endforeach
25         </div>
26     @endif
27 </div>