1 {{--This view display child pages in a list if pre-loaded onto a 'visible_pages' property,--}}
2 {{--To ensure that the pages have been loaded efficiently with permissions taken into account.--}}
3 <a href="{{ $chapter->getUrl() }}" class="chapter entity-list-item @if($chapter->visible_pages->count() > 0) has-children @endif" data-entity-type="chapter" data-entity-id="{{$chapter->id}}">
4 <span class="icon text-chapter">@icon('chapter')</span>
6 <h4 class="entity-list-item-name break-text">{{ $chapter->name }}</h4>
7 <div class="entity-item-snippet">
8 <p class="text-muted break-text mb-s">{{ $chapter->getExcerpt() }}</p>
12 @if ($chapter->visible_pages->count() > 0)
13 <div class="chapter chapter-expansion">
14 <span class="icon text-chapter">@icon('page')</span>
16 <button type="button" chapter-toggle
18 class="text-muted chapter-expansion-toggle">@icon('caret-right') <span>{{ trans_choice('entities.x_pages', $chapter->visible_pages->count()) }}</span></button>
19 <div class="inset-list">
20 <div class="entity-list-item-children">
21 @include('partials.entity-list', ['entities' => $chapter->visible_pages])