From 4d5e47a2d2e17023d4eaa0ec4ae2cc64d2dd5bd1 Mon Sep 17 00:00:00 2001 From: Dan Brown Date: Sat, 13 Apr 2019 11:24:41 +0100 Subject: [PATCH] Updated empty container item states --- resources/lang/en/entities.php | 1 - resources/views/books/show.blade.php | 31 +++++++++++++++---------- resources/views/chapters/show.blade.php | 25 ++++++++++++-------- resources/views/shelves/show.blade.php | 19 ++++++++------- 4 files changed, 45 insertions(+), 31 deletions(-) diff --git a/resources/lang/en/entities.php b/resources/lang/en/entities.php index 0b5eab73b..c2c15d72f 100644 --- a/resources/lang/en/entities.php +++ b/resources/lang/en/entities.php @@ -119,7 +119,6 @@ return [ 'books_permissions_updated' => 'Book Permissions Updated', 'books_empty_contents' => 'No pages or chapters have been created for this book.', 'books_empty_create_page' => 'Create a new page', - 'books_empty_or' => 'or', 'books_empty_sort_current_book' => 'Sort the current book', 'books_empty_add_chapter' => 'Add a chapter', 'books_permissions_active' => 'Book Permissions Active', diff --git a/resources/views/books/show.blade.php b/resources/views/books/show.blade.php index b33cb6715..792d8ecc4 100644 --- a/resources/views/books/show.blade.php +++ b/resources/views/books/show.blade.php @@ -29,18 +29,25 @@ @endforeach @else -
- {{--TODO - Empty States --}} -

{{ trans('entities.books_empty_contents') }}

- @if(userCan('page-create', $book)) - @icon('page'){{ trans('entities.books_empty_create_page') }} - @endif - @if(userCan('page-create', $book) && userCan('chapter-create', $book)) -   -{{ trans('entities.books_empty_or') }}-    - @endif - @if(userCan('chapter-create', $book)) - @icon('chapter'){{ trans('entities.books_empty_add_chapter') }} - @endif +
+
+

{{ trans('entities.books_empty_contents') }}

+ +
+ @if(userCan('page-create', $book)) + + @icon('page') + {{ trans('entities.books_empty_create_page') }} + + @endif + @if(userCan('chapter-create', $book)) + + @icon('chapter') + {{ trans('entities.books_empty_add_chapter') }} + + @endif +
+
@endif
diff --git a/resources/views/chapters/show.blade.php b/resources/views/chapters/show.blade.php index 878a935df..8eddd5851 100644 --- a/resources/views/chapters/show.blade.php +++ b/resources/views/chapters/show.blade.php @@ -26,20 +26,25 @@ @endforeach @else - {{--TODO - Empty States --}} -
-

{{ trans('entities.chapters_empty') }}

-

+

+
+

{{ trans('entities.chapters_empty') }}

+ +
@if(userCan('page-create', $chapter)) - @icon('page'){{ trans('entities.books_empty_create_page') }} - @endif - @if(userCan('page-create', $chapter) && userCan('book-update', $book)) -   -{{ trans('entities.books_empty_or') }}-     + + @icon('page') + {{ trans('entities.books_empty_create_page') }} + @endif @if(userCan('book-update', $book)) - @icon('book'){{ trans('entities.books_empty_sort_current_book') }} + + @icon('book') + {{ trans('entities.books_empty_sort_current_book') }} + @endif -

+
+
@endif
diff --git a/resources/views/shelves/show.blade.php b/resources/views/shelves/show.blade.php index a4200b993..0cfaebbd7 100644 --- a/resources/views/shelves/show.blade.php +++ b/resources/views/shelves/show.blade.php @@ -19,15 +19,18 @@ @endforeach @else -

- {{-- TODO - Empty Shelf State--}} +


- {{ trans('entities.shelves_empty_contents') }} - @if(userCan('bookshelf-create', $shelf)) -
- {{ trans('entities.shelves_edit_and_assign') }} - @endif -

+

{{ trans('entities.shelves_empty_contents') }}

+
+ @if(userCan('bookshelf-update', $shelf)) + + @icon('edit') + {{ trans('entities.shelves_edit_and_assign') }} + + @endif +
+
@endif