mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-06-03 08:13:14 +08:00
Add button to add a book directly from a shelf view
This commit is contained in:
@ -17,7 +17,7 @@
|
||||
|
||||
<div class="content-wrap card">
|
||||
<h1 class="list-heading">{{ trans('entities.books_create') }}</h1>
|
||||
<form action="{{ baseUrl("/books") }}" method="POST" enctype="multipart/form-data">
|
||||
<form action="{{ isset($bookshelf) ? $bookshelf->getUrl('/create-book') : baseUrl('/books') }}" method="POST" enctype="multipart/form-data">
|
||||
@include('books.form')
|
||||
</form>
|
||||
</div>
|
||||
|
@ -23,6 +23,12 @@
|
||||
<hr>
|
||||
<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">
|
||||
<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 text-bookshelf">
|
||||
<span class="icon">@icon('edit')</span>
|
||||
|
Reference in New Issue
Block a user