@extends('sidebar-layout') @section('toolbar')
@include('chapters._breadcrumbs', ['chapter' => $chapter])
@icon('export'){{ trans('entities.export') }}
@if(userCan('page-create', $chapter)) @icon('add'){{ trans('entities.pages_new') }} @endif @if(userCan('chapter-update', $chapter)) @icon('edit'){{ trans('common.edit') }} @endif @if(userCan('chapter-update', $chapter) || userCan('restrictions-manage', $chapter) || userCan('chapter-delete', $chapter)) @endif
@stop @section('container-attrs') id="entity-dashboard" entity-id="{{ $chapter->id }}" entity-type="chapter" @stop @section('sidebar')
@if($book->restricted || $chapter->restricted)

@icon('permission') {{ trans('entities.permissions') }}

@if($book->restricted)

@if(userCan('restrictions-manage', $book)) @icon('lock'){{ trans('entities.books_permissions_active') }} @else @icon('lock'){{ trans('entities.books_permissions_active') }} @endif

@endif @if($chapter->restricted)

@if(userCan('restrictions-manage', $chapter)) @icon('lock'){{ trans('entities.chapters_permissions_active') }} @else @icon('lock'){{ trans('entities.chapters_permissions_active') }} @endif

@endif
@endif

@icon('info') {{ trans('common.details') }}

@include('partials.entity-meta', ['entity' => $chapter])
@include('partials/book-tree', ['book' => $book, 'sidebarTree' => $sidebarTree]) @stop @section('body')

{{ $chapter->name }}

{!! nl2br(e($chapter->description)) !!}

@if(count($pages) > 0)

@foreach($pages as $page) @include('pages/list-item', ['page' => $page])
@endforeach
@else

{{ trans('entities.chapters_empty') }}

@if(userCan('page-create', $chapter)) @icon('page'){{ trans('entities.books_empty_create_page') }} @endif @if(userCan('page-create', $chapter) && userCan('book-update', $book))   -{{ trans('entities.books_empty_or') }}-     @endif @if(userCan('book-update', $book)) @icon('book'){{ trans('entities.books_empty_sort_current_book') }} @endif

@endif

{{ trans('entities.search_results') }} @icon('close'){{ trans('entities.search_clear') }}

@include('partials/loading-icon')
@stop