NOW MANAGED ON CODEBERG
Updated empty container item states
Dan Brown4d5e47a2d2e1
diff --git a/resources/lang/en/entities.php b/resources/lang/en/entities.phpindex 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.phpindex b33cb6715..792d8ecc4 100644--- a/resources/views/books/show.blade.php+++ b/resources/views/books/show.blade.php@@ -29,18 +29,25 @@@endforeach</div>@else- <div>- {{--TODO - Empty States --}}- <p class="text-muted italic">{{ trans('entities.books_empty_contents') }}</p>- @if(userCan('page-create', $book))- <a href="{{ $book->getUrl('/create-page') }}" class="button outline">@icon('page'){{ trans('entities.books_empty_create_page') }}</a>- @endif- @if(userCan('page-create', $book) && userCan('chapter-create', $book))- <em class="text-muted">-{{ trans('entities.books_empty_or') }}-</em> - @endif- @if(userCan('chapter-create', $book))- <a href="{{ $book->getUrl('/create-chapter') }}" class="button outline">@icon('chapter'){{ trans('entities.books_empty_add_chapter') }}</a>- @endif+ <div class="mt-xl" v-pre>+ <hr>+ <p class="text-muted italic mb-m mt-xl">{{ trans('entities.books_empty_contents') }}</p>++ <div class="icon-list block inline">+ @if(userCan('page-create', $book))+ <a href="{{ $book->getUrl('/create-page') }}" class="icon-list-item text-page">+ <span class="icon">@icon('page')</span>+ <span>{{ trans('entities.books_empty_create_page') }}</span>+ </a>+ @endif+ @if(userCan('chapter-create', $book))+ <a href="{{ $book->getUrl('/create-chapter') }}" class="icon-list-item text-chapter">+ <span class="icon">@icon('chapter')</span>+ <span>{{ trans('entities.books_empty_add_chapter') }}</span>+ </a>+ @endif+ </div>+</div>@endif</div>diff --git a/resources/views/chapters/show.blade.php b/resources/views/chapters/show.blade.phpindex 878a935df..8eddd5851 100644--- a/resources/views/chapters/show.blade.php+++ b/resources/views/chapters/show.blade.php@@ -26,20 +26,25 @@@endforeach</div>@else- {{--TODO - Empty States --}}- <div v-pre>- <p class="text-muted italic">{{ trans('entities.chapters_empty') }}</p>- <p>+ <div class="mt-xl" v-pre>+ <hr>+ <p class="text-muted italic mb-m mt-xl">{{ trans('entities.chapters_empty') }}</p>++ <div class="icon-list block inline">@if(userCan('page-create', $chapter))- <a href="{{ $chapter->getUrl('/create-page') }}" class="button outline">@icon('page'){{ trans('entities.books_empty_create_page') }}</a>- @endif- @if(userCan('page-create', $chapter) && userCan('book-update', $book))- <em class="text-muted">-{{ trans('entities.books_empty_or') }}-</em> + <a href="{{ $chapter->getUrl('/create-page') }}" class="icon-list-item text-page">+ <span class="icon">@icon('page')</span>+ <span>{{ trans('entities.books_empty_create_page') }}</span>+ </a>@endif@if(userCan('book-update', $book))- <a href="{{ $book->getUrl('/sort') }}" class="button outline">@icon('book'){{ trans('entities.books_empty_sort_current_book') }}</a>+ <a href="{{ $book->getUrl('/sort') }}" class="icon-list-item text-book">+ <span class="icon">@icon('book')</span>+ <span>{{ trans('entities.books_empty_sort_current_book') }}</span>+ </a>@endif- </p>+ </div>+</div>@endif</div>diff --git a/resources/views/shelves/show.blade.php b/resources/views/shelves/show.blade.phpindex a4200b993..0cfaebbd7 100644--- a/resources/views/shelves/show.blade.php+++ b/resources/views/shelves/show.blade.php@@ -19,15 +19,18 @@@endforeach</div>@else- <p>- {{-- TODO - Empty Shelf State--}}+ <div class="mt-xl"><hr>- <span class="text-muted italic">{{ trans('entities.shelves_empty_contents') }}</span>- @if(userCan('bookshelf-create', $shelf))- <br/>- <a href="{{ $shelf->getUrl('/edit') }}" class="button outline">{{ trans('entities.shelves_edit_and_assign') }}</a>- @endif- </p>+ <p class="text-muted italic mt-xl mb-m">{{ trans('entities.shelves_empty_contents') }}</p>+ <div class="icon-list inline block">+ @if(userCan('bookshelf-update', $shelf))+ <a href="{{ $shelf->getUrl('/edit') }}" class="icon-list-item text-bookshelf">+ <span class="icon">@icon('edit')</span>+ <span>{{ trans('entities.shelves_edit_and_assign') }}</span>+ </a>+ @endif+ </div>+ </div>@endif</div></div>