<input refs="shelf-sort@input" type="hidden" name="books"
value="{{ isset($shelf) ? $shelf->visibleBooks->implode('id', ',') : '' }}">
<div class="scroll-box-header-item">{{ trans('entities.shelves_drag_books') }}</div>
- <div refs="shelf-sort@shelf-book-list" class="scroll-box">
- @if (count($shelf->visibleBooks ?? []) > 0)
- @foreach ($shelf->visibleBooks as $book)
- <div data-id="{{ $book->id }}" class="scroll-box-item">
- <div class="handle">@icon('grip')</div>
- <a href="{{ $book->getUrl() }}" class="text-book">@icon('book'){{ $book->name }}</a>
- </div>
- @endforeach
- @endif
- </div>
+ <ul refs="shelf-sort@shelf-book-list" class="scroll-box">
+ @foreach (($shelf->visibleBooks ?? []) as $book)
+ @include('shelves.parts.shelf-sort-book-item', ['book' => $book])
+ @endforeach
+ </ul>
</div>
<div class="form-group">
<label for="books">{{ trans('entities.shelves_add_books') }}</label>
<input type="text" refs="shelf-sort@book-search" class="scroll-box-search" placeholder="{{ trans('common.search') }}">
- <div refs="shelf-sort@all-book-list" class="scroll-box">
+ <ul refs="shelf-sort@all-book-list" class="scroll-box">
@foreach ($books as $book)
- <div data-id="{{ $book->id }}" class="scroll-box-item">
- <div class="handle">@icon('grip')</div>
- <a href="{{ $book->getUrl() }}" class="text-book">@icon('book'){{ $book->name }}</a>
- </div>
+ @include('shelves.parts.shelf-sort-book-item', ['book' => $book])
@endforeach
- </div>
+ </ul>
</div>
</div>