<h1>{{ $chapter->name }}</h1>
<p class="text-muted">{{ $chapter->description }}</p>
- @if(count($chapter->pages) > 0)
+ @if(count($pages) > 0)
<div class="page-list">
<hr>
- @foreach($chapter->pages as $page)
+ @foreach($pages as $page)
@include('pages/list-item', ['page' => $page])
<hr>
@endforeach
</p>
</div>
<div class="col-md-3 col-md-offset-1">
+ <div class="margin-top large"></div>
+ @if($book->restricted || $chapter->restricted)
+ <div class="text-muted">
+
+ @if($book->restricted)
+ @if(userCan('restrictions-manage', $book))
+ <a href="{{ $book->getUrl() }}/restrict"><i class="zmdi zmdi-lock-outline"></i>Book Restricted</a>
+ @else
+ <i class="zmdi zmdi-lock-outline"></i>Book Restricted
+ @endif
+ <br>
+ @endif
+
+ @if($chapter->restricted)
+ @if(userCan('restrictions-manage', $chapter))
+ <a href="{{ $chapter->getUrl() }}/restrict"><i class="zmdi zmdi-lock-outline"></i>Chapter Restricted</a>
+ @else
+ <i class="zmdi zmdi-lock-outline"></i>Chapter Restricted
+ @endif
+ @endif
+ </div>
+ @endif
+
@include('pages/sidebar-tree-list', ['book' => $book, 'sidebarTree' => $sidebarTree])
</div>
</div>