- <div class="col-sm-6 col-xs-9 faded">
- <div class="action-buttons">
- <span dropdown class="dropdown-container">
- <div dropdown-toggle class="text-button text-primary">@icon('export'){{ trans('entities.export') }}</div>
- <ul class="wide">
- <li><a href="{{ $chapter->getUrl('/export/html') }}" target="_blank">{{ trans('entities.export_html') }} <span class="text-muted float right">.html</span></a></li>
- <li><a href="{{ $chapter->getUrl('/export/pdf') }}" target="_blank">{{ trans('entities.export_pdf') }} <span class="text-muted float right">.pdf</span></a></li>
- <li><a href="{{ $chapter->getUrl('/export/plaintext') }}" target="_blank">{{ trans('entities.export_text') }} <span class="text-muted float right">.txt</span></a></li>
- </ul>
- </span>
- @if(userCan('page-create', $chapter))
- <a href="{{ $chapter->getUrl('/create-page') }}" class="text-pos text-button">@icon('add'){{ trans('entities.pages_new') }}</a>
- @endif
- @if(userCan('chapter-update', $chapter))
- <a href="{{ $chapter->getUrl('/edit') }}" class="text-primary text-button">@icon('edit'){{ trans('common.edit') }}</a>
- @endif
- @if((userCan('chapter-update', $chapter) && userCan('chapter-delete', $chapter) )|| userCan('restrictions-manage', $chapter) || userCan('chapter-delete', $chapter))
- <div dropdown class="dropdown-container">
- <a dropdown-toggle class="text-primary text-button">@icon('more') {{ trans('common.more') }}</a>
- <ul>
- @if(userCan('chapter-update', $chapter) && userCan('chapter-delete', $chapter))
- <li><a href="{{ $chapter->getUrl('/move') }}" class="text-primary">@icon('folder'){{ trans('common.move') }}</a></li>
- @endif
- @if(userCan('restrictions-manage', $chapter))
- <li><a href="{{ $chapter->getUrl('/permissions') }}" class="text-primary">@icon('lock'){{ trans('entities.permissions') }}</a></li>
+
+ <main class="content-wrap card">
+ <h1 class="break-text">{{ $chapter->name }}</h1>
+ <div refs="entity-search@contentView" class="chapter-content">
+ <p class="text-muted break-text">{!! nl2br(e($chapter->description)) !!}</p>
+ @if(count($pages) > 0)
+ <div class="entity-list book-contents">
+ @foreach($pages as $page)
+ @include('pages.parts.list-item', ['page' => $page])
+ @endforeach
+ </div>
+ @else
+ <div class="mt-xl">
+ <hr>
+ <p class="text-muted italic mb-m mt-xl">{{ trans('entities.chapters_empty') }}</p>
+
+ <div class="icon-list block inline">
+ @if(userCan('page-create', $chapter))
+ <a href="{{ $chapter->getUrl('/create-page') }}" class="icon-list-item text-page">
+ <span class="icon">@icon('page')</span>
+ <span>{{ trans('entities.books_empty_create_page') }}</span>
+ </a>