@extends('tri-layout') @section('container-attrs') id="entity-dashboard" entity-id="{{ $chapter->id }}" entity-type="chapter" @stop @section('body')
@include('chapters._breadcrumbs', ['chapter' => $chapter])

{{ $chapter->name }}

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

@if(count($pages) > 0)
@foreach($pages as $page) @include('pages.list-item', ['page' => $page]) @endforeach
@else {{--TODO--}}

{{ 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
{{--TODO--}}

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

@include('partials/loading-icon')
@stop @section('right')
{{ trans('common.actions') }}
@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('chapter-delete', $chapter)) @icon('folder') {{ trans('common.move') }} @endif @if(userCan('restrictions-manage', $chapter)) @icon('lock') {{ trans('entities.permissions') }} @endif @if(userCan('chapter-delete', $chapter)) @icon('delete') {{ trans('common.delete') }} @endif {{--@if(userCan('page-create', $book))--}} {{----}} {{--@icon('add')--}} {{--{{ trans('entities.pages_new') }}--}} {{----}} {{--@endif--}}
@stop @section('left') @if($chapter->tags->count() > 0)
@include('components.tag-list', ['entity' => $chapter])
@endif
{{ trans('common.details') }}
@include('partials/book-tree', ['book' => $book, 'sidebarTree' => $sidebarTree]) @stop