]> BookStack Code Mirror - bookstack/commitdiff
Update create new book button on shelves to 2019 design 1366/head
authorChristopher Wilkinson <redacted>
Mon, 15 Apr 2019 09:56:21 +0000 (10:56 +0100)
committerChristopher Wilkinson <redacted>
Mon, 15 Apr 2019 09:56:21 +0000 (10:56 +0100)
resources/views/books/create.blade.php
resources/views/shelves/show.blade.php

index e33ae2bae10f0663da8a9e23741f7fa4aa17548b..882ce556a177525cebd9ceb7c30ccf7f3f48ed20 100644 (file)
@@ -3,16 +3,26 @@
 @section('body')
     <div class="container small">
         <div class="my-s">
-            @include('partials.breadcrumbs', ['crumbs' => [
-                '/books' => [
-                    'text' => trans('entities.books'),
-                    'icon' => 'book'
-                ],
-                '/create-book' => [
-                    'text' => trans('entities.books_create'),
-                    'icon' => 'add'
-                ]
-            ]])
+            @if (isset($bookshelf))
+                @include('partials.breadcrumbs', ['crumbs' => [
+                    $bookshelf,
+                    $bookshelf->getUrl('/create-book') => [
+                        'text' => trans('entities.books_create'),
+                        'icon' => 'add'
+                    ]
+                ]])
+            @else
+                @include('partials.breadcrumbs', ['crumbs' => [
+                    '/books' => [
+                        'text' => trans('entities.books'),
+                        'icon' => 'book'
+                    ],
+                    '/create-book' => [
+                        'text' => trans('entities.books_create'),
+                        'icon' => 'add'
+                    ]
+                ]])
+            @endif
         </div>
 
         <div class="content-wrap card">
index 77423c144f0a5b644a9c672b6add4a68f1bf7aec..a57abecb3c912da99a00328137c1b45f2b68d36e 100644 (file)
@@ -24,7 +24,7 @@
                     <p class="text-muted italic mt-xl mb-m">{{ trans('entities.shelves_empty_contents') }}</p>
                     <div class="icon-list inline block">
                         @if($currentUser->can('book-create-all'))
-                            <a href="{{ $shelf->getUrl('/create-book') }}" class="icon-list-item text-bookshelf">
+                            <a href="{{ $shelf->getUrl('/create-book') }}" class="icon-list-item">
                                 <span class="icon">@icon('add')</span>
                                 <span>{{ trans('entities.books_create') }}</span>
                             </a>
         <h5>{{ trans('common.actions') }}</h5>
         <div class="icon-list text-primary">
 
+            @if($currentUser->can('book-create-all'))
+                <a href="{{ $shelf->getUrl('/create-book') }}" class="icon-list-item">
+                    <span class="icon">@icon('add')</span>
+                    <span>{{ trans('entities.books_create') }}</span>
+                </a>
+            @endif
+
             @if(userCan('bookshelf-update', $shelf))
                 <a href="{{ $shelf->getUrl('/edit') }}" class="icon-list-item">
                     <span>@icon('edit')</span>
Morty Proxy This is a proxified and sanitized view of the page, visit original site.