2021-08-22 13:15:58 +01:00
|
|
|
@extends('layouts.tri')
|
2015-07-28 20:57:13 +01:00
|
|
|
|
2019-01-13 15:54:55 +00:00
|
|
|
@section('container-attrs')
|
2020-06-28 21:15:00 +01:00
|
|
|
component="entity-search"
|
|
|
|
|
option:entity-search:entity-id="{{ $chapter->id }}"
|
|
|
|
|
option:entity-search:entity-type="chapter"
|
2019-01-13 15:54:55 +00:00
|
|
|
@stop
|
|
|
|
|
|
2020-12-21 23:20:13 -06:00
|
|
|
@push('social-meta')
|
2021-06-23 20:42:48 +01:00
|
|
|
<meta property="og:description" content="{{ Str::limit($chapter->description, 100, '...') }}">
|
2020-12-21 23:20:13 -06:00
|
|
|
@endpush
|
|
|
|
|
|
2022-07-23 18:29:04 +01:00
|
|
|
@include('entities.body-tag-classes', ['entity' => $chapter])
|
|
|
|
|
|
2019-01-13 15:54:55 +00:00
|
|
|
@section('body')
|
|
|
|
|
|
2019-08-25 11:30:26 +01:00
|
|
|
<div class="mb-m print-hidden">
|
2021-08-22 13:15:58 +01:00
|
|
|
@include('entities.breadcrumbs', ['crumbs' => [
|
2019-02-17 17:52:42 +00:00
|
|
|
$chapter->book,
|
|
|
|
|
$chapter,
|
|
|
|
|
]])
|
2017-08-20 13:57:25 +01:00
|
|
|
</div>
|
2019-01-13 15:54:55 +00:00
|
|
|
|
2019-08-25 15:44:51 +01:00
|
|
|
<main class="content-wrap card">
|
2020-06-28 21:15:00 +01:00
|
|
|
<h1 class="break-text">{{ $chapter->name }}</h1>
|
|
|
|
|
<div refs="entity-search@contentView" class="chapter-content">
|
2025-10-18 13:14:30 +01:00
|
|
|
<div class="text-muted break-text">{!! $chapter->descriptionInfo()->getHtml() !!}</div>
|
2019-01-13 15:54:55 +00:00
|
|
|
@if(count($pages) > 0)
|
2020-06-28 21:15:00 +01:00
|
|
|
<div class="entity-list book-contents">
|
2019-01-13 15:54:55 +00:00
|
|
|
@foreach($pages as $page)
|
2021-08-22 13:15:58 +01:00
|
|
|
@include('pages.parts.list-item', ['page' => $page])
|
2019-01-13 15:54:55 +00:00
|
|
|
@endforeach
|
|
|
|
|
</div>
|
|
|
|
|
@else
|
2020-06-28 21:15:00 +01:00
|
|
|
<div class="mt-xl">
|
2019-04-13 11:24:41 +01:00
|
|
|
<hr>
|
|
|
|
|
<p class="text-muted italic mb-m mt-xl">{{ trans('entities.chapters_empty') }}</p>
|
|
|
|
|
|
|
|
|
|
<div class="icon-list block inline">
|
2025-09-09 09:48:19 +01:00
|
|
|
@if(userCan(\BookStack\Permissions\Permission::PageCreate, $chapter))
|
2019-04-13 11:24:41 +01:00
|
|
|
<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>
|
2019-01-13 15:54:55 +00:00
|
|
|
@endif
|
2025-09-09 09:48:19 +01:00
|
|
|
@if(userCan(\BookStack\Permissions\Permission::BookUpdate, $book))
|
2019-04-13 11:24:41 +01:00
|
|
|
<a href="{{ $book->getUrl('/sort') }}" class="icon-list-item text-book">
|
|
|
|
|
<span class="icon">@icon('book')</span>
|
|
|
|
|
<span>{{ trans('entities.books_empty_sort_current_book') }}</span>
|
|
|
|
|
</a>
|
2019-01-13 15:54:55 +00:00
|
|
|
@endif
|
2019-04-13 11:24:41 +01:00
|
|
|
</div>
|
|
|
|
|
|
2019-01-13 15:54:55 +00:00
|
|
|
</div>
|
|
|
|
|
@endif
|
|
|
|
|
</div>
|
|
|
|
|
|
2021-08-22 13:15:58 +01:00
|
|
|
@include('entities.search-results')
|
2019-08-25 15:44:51 +01:00
|
|
|
</main>
|
2019-01-13 15:54:55 +00:00
|
|
|
|
2021-08-22 13:15:58 +01:00
|
|
|
@include('entities.sibling-navigation', ['next' => $next, 'previous' => $previous])
|
2021-05-29 12:39:41 +01:00
|
|
|
|
2019-01-13 15:54:55 +00:00
|
|
|
@stop
|
|
|
|
|
|
|
|
|
|
@section('right')
|
2026-02-08 17:03:48 +00:00
|
|
|
@include('chapters.parts.show-sidebar-section-details', ['chapter' => $chapter, 'book' => $book, 'watchOptions' => $watchOptions])
|
|
|
|
|
@include('chapters.parts.show-sidebar-section-actions', ['chapter' => $chapter, 'watchOptions' => $watchOptions])
|
2017-08-20 13:57:25 +01:00
|
|
|
@stop
|
2015-07-28 20:57:13 +01:00
|
|
|
|
2019-01-13 15:54:55 +00:00
|
|
|
@section('left')
|
2021-08-22 13:15:58 +01:00
|
|
|
@include('entities.search-form', ['label' => trans('entities.chapters_search_this')])
|
2026-02-08 17:03:48 +00:00
|
|
|
@include('chapters.parts.show-sidebar-section-tags', ['chapter' => $chapter])
|
2021-08-22 13:15:58 +01:00
|
|
|
@include('entities.book-tree', ['book' => $book, 'sidebarTree' => $sidebarTree])
|
2017-08-20 13:57:25 +01:00
|
|
|
@stop
|
|
|
|
|
|
2015-07-28 20:57:13 +01:00
|
|
|
|