]> BookStack Code Mirror - bookstack/blob - resources/views/books/parts/sort-box.blade.php
Finished off design and fixing of sort buttons
[bookstack] / resources / views / books / parts / sort-box.blade.php
1 <details class="sort-box" data-type="book" data-id="{{ $book->id }}" open>
2     <summary>
3         <h5 class="flex-container-row items-center justify-flex-start gap-xs">
4             <div class="text-book text-bigger caret-container">
5                 @icon('caret-right')
6             </div>
7             <div class="entity-list-item no-hover py-s text-book px-none">
8                 <span>@icon('book')</span>
9                 <span>{{ $book->name }}</span>
10             </div>
11         </h5>
12     </summary>
13     <div class="sort-box-options pb-sm">
14         <button type="button" data-sort="name" class="button outline small">{{ trans('entities.books_sort_name') }}</button>
15         <button type="button" data-sort="created" class="button outline small">{{ trans('entities.books_sort_created') }}</button>
16         <button type="button" data-sort="updated" class="button outline small">{{ trans('entities.books_sort_updated') }}</button>
17         <button type="button" data-sort="chaptersFirst" class="button outline small">{{ trans('entities.books_sort_chapters_first') }}</button>
18         <button type="button" data-sort="chaptersLast" class="button outline small">{{ trans('entities.books_sort_chapters_last') }}</button>
19     </div>
20     <ul class="sortable-page-list sort-list">
21
22         @foreach($bookChildren as $bookChild)
23             <li class="text-{{ $bookChild->getType() }}"
24                 data-id="{{$bookChild->id}}"
25                 data-type="{{ $bookChild->getType() }}"
26                 data-name="{{ $bookChild->name }}"
27                 data-created="{{ $bookChild->created_at->timestamp }}"
28                 data-updated="{{ $bookChild->updated_at->timestamp }}"
29                 tabindex="0">
30                 <div class="flex-container-row items-center">
31                     <div class="text-muted sort-list-handle px-s py-m">@icon('grip')</div>
32                     <div class="entity-list-item px-none no-hover">
33                         <span>@icon($bookChild->getType()) </span>
34                         <div>
35                             {{ $bookChild->name }}
36                             <div>
37
38                             </div>
39                         </div>
40                     </div>
41                     @include('books.parts.sort-box-actions')
42                 </div>
43                 @if($bookChild->isA('chapter'))
44                     <ul class="sortable-page-sublist">
45                         @foreach($bookChild->visible_pages as $page)
46                             <li class="text-page flex-container-row items-center"
47                                 data-id="{{$page->id}}" data-type="page"
48                                 data-name="{{ $page->name }}" data-created="{{ $page->created_at->timestamp }}"
49                                 data-updated="{{ $page->updated_at->timestamp }}"
50                                 tabindex="0">
51                                 <div class="text-muted sort-list-handle px-s py-m">@icon('grip')</div>
52                                 <div class="entity-list-item px-none no-hover">
53                                     <span>@icon('page')</span>
54                                     <span>{{ $page->name }}</span>
55                                 </div>
56                                 @include('books.parts.sort-box-actions')
57                             </li>
58                         @endforeach
59                     </ul>
60                 @endif
61             </li>
62         @endforeach
63
64     </ul>
65 </details>