]> BookStack Code Mirror - bookstack/blob - resources/views/chapters/show.blade.php
6abc95e5c0f63685f05255c19b6a75558ae7f92c
[bookstack] / resources / views / chapters / show.blade.php
1 @extends('base')
2
3 @section('content')
4
5     <div class="row faded-small">
6         <div class="col-md-6 faded">
7             <div class="breadcrumbs padded-horizontal">
8                 <a href="{{$book->getUrl()}}"><i class="zmdi zmdi-book"></i>{{ $book->name }}</a>
9             </div>
10         </div>
11         <div class="col-md-6 faded">
12             <div class="action-buttons">
13                 @if($currentUser->can('chapter-create'))
14                     <a href="{{$chapter->getUrl() . '/create-page'}}" class="text-pos"><i class="zmdi zmdi-plus"></i>New Page</a>
15                 @endif
16                 @if($currentUser->can('chapter-update'))
17                     <a href="{{$chapter->getUrl() . '/edit'}}" class="text-primary"><i class="zmdi zmdi-edit"></i>Edit</a>
18                 @endif
19                 @if($currentUser->can('chapter-delete'))
20                     <a href="{{$chapter->getUrl() . '/delete'}}" class="text-neg"><i class="zmdi zmdi-delete"></i>Delete</a>
21                 @endif
22             </div>
23         </div>
24     </div>
25
26
27     <div class="page-content">
28         <h1>{{ $chapter->name }}</h1>
29         <p class="text-muted">{{ $chapter->description }}</p>
30
31         @if(count($chapter->pages) > 0)
32             <div class="page-list">
33                 <hr>
34                 @foreach($chapter->pages as $page)
35                     <div >
36                         <h3>
37                             <a href="{{ $page->getUrl() }}">
38                                 <i class="zmdi zmdi-file-text"></i>{{ $page->name }}
39                             </a>
40                         </h3>
41                         <p class="text-muted">
42                             {{$page->getExcerpt(180)}}
43                         </p>
44                     </div>
45                     <hr>
46                 @endforeach
47             </div>
48         @else
49             <p class="text-muted">No pages are in this chapter</p>
50         @endif
51
52         <p class="text-muted small">
53             Created {{$chapter->created_at->diffForHumans()}} @if($chapter->createdBy) by {{$chapter->createdBy->name}} @endif
54             <br>
55             Last Updated {{$chapter->updated_at->diffForHumans()}} @if($chapter->createdBy) by {{$chapter->updatedBy->name}} @endif
56         </p>
57     </div>
58
59
60 @stop