]> BookStack Code Mirror - bookstack/blobdiff - resources/views/books/index.blade.php
Add prev and next button to navigate through different pages
[bookstack] / resources / views / books / index.blade.php
index b1998da3baff9afb81ed6e7dda5559b63d547be5..81fb66cfcd18148a796cd478ed53b43110a4817c 100644 (file)
@@ -1,5 +1,9 @@
 @extends('tri-layout')
 
+@section('body')
+    @include('books.list', ['books' => $books, 'view' => $view])
+@stop
+
 @section('left')
     @if($recents)
         <div id="recents" class="mb-xl">
     </div>
 @stop
 
-@section('body')
-    @include('books.list', ['books' => $books, 'bookViewType' => $booksViewType])
-@stop
-
 @section('right')
 
-    <div class="actions mb-xl px-xl">
-        <h5>Actions</h5>
+    <div class="actions mb-xl">
+        <h5>{{ trans('common.actions') }}</h5>
         <div class="icon-list text-primary">
-            @if($currentUser->can('book-create-all'))
-                <a href="{{ baseUrl("/create-book") }}" class="icon-list-item">
-                    <span class="icon">@icon('add')</span>
+            @if(user()->can('book-create-all'))
+                <a href="{{ url("/create-book") }}" class="icon-list-item">
+                    <span>@icon('add')</span>
                     <span>{{ trans('entities.books_create') }}</span>
                 </a>
             @endif
-            @include('books.view-toggle', ['booksViewType' => $booksViewType])
+
+            @include('partials.view-toggle', ['view' => $view, 'type' => 'books'])
         </div>
     </div>