Updated empty container item states

This commit is contained in:
Dan Brown 2019-04-13 11:24:41 +01:00
parent d66fab8bee
commit 4d5e47a2d2
No known key found for this signature in database
GPG key ID: 46D9F943C24A2EF9
4 changed files with 45 additions and 31 deletions

View file

@ -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',

View file

@ -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))
&nbsp;&nbsp;<em class="text-muted">-{{ trans('entities.books_empty_or') }}-</em>&nbsp;&nbsp;&nbsp;
@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>

View file

@ -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))
&nbsp;&nbsp;<em class="text-muted">-{{ trans('entities.books_empty_or') }}-</em>&nbsp;&nbsp; &nbsp;
<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>

View file

@ -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>