]> BookStack Code Mirror - bookstack/blob - resources/views/chapters/list-item.blade.php
Finished migration of last angular code
[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->getShortName() }}
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
14     <div class="entity-item-snippet">
15         @if(isset($chapter->searchSnippet))
16             <p class="text-muted">{!! $chapter->searchSnippet !!}</p>
17         @else
18             <p class="text-muted">{{ $chapter->getExcerpt() }}</p>
19         @endif
20     </div>
21
22
23     @if(!isset($hidePages) && count($chapter->pages) > 0)
24         <p chapter-toggle class="text-muted"><i class="zmdi zmdi-caret-right"></i> <i class="zmdi zmdi-file-text"></i> <span>{{ trans_choice('entities.x_pages', $chapter->pages->count()) }}</span></p>
25         <div class="inset-list">
26             @foreach($chapter->pages as $page)
27                 <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>
28             @endforeach
29         </div>
30     @endif
31 </div>