1 @extends('layouts.simple')
5 <div class="container">
8 @include('entities.breadcrumbs', ['crumbs' => [
10 $book->getUrl('/sort') => [
11 'text' => trans('entities.books_sort'),
17 <div class="grid left-focus gap-xl">
19 <div component="book-sort" class="card content-wrap auto-height">
20 <h1 class="list-heading">{{ trans('entities.books_sort') }}</h1>
22 <div class="flex-container-row gap-m wrap mb-m">
23 <p class="text-muted flex min-width-s mb-none">{{ trans('entities.books_sort_desc') }}</p>
24 <div class="min-width-s">
26 $autoSortVal = intval(old('auto-sort') ?? $book->sort_rule_id ?? 0);
28 <label for="auto-sort">{{ trans('entities.books_sort_auto_sort') }}</label>
29 <select id="auto-sort"
32 class="{{ $errors->has('auto-sort') ? 'neg' : '' }}">
33 <option value="0" @if($autoSortVal === 0) selected @endif>-- {{ trans('common.none') }}
36 @foreach(\BookStack\Sorting\SortRule::allByName() as $rule)
37 <option value="{{$rule->id}}"
38 @if($autoSortVal === $rule->id) selected @endif
47 <div refs="book-sort@sortContainer">
48 @include('books.parts.sort-box', ['book' => $book, 'bookChildren' => $bookChildren])
51 <form id="sort-form" action="{{ $book->getUrl('/sort') }}" method="POST">
53 <input type="hidden" name="_method" value="PUT">
54 <input refs="book-sort@input" type="hidden" name="sort-tree">
55 <div class="list text-right">
56 <a href="{{ $book->getUrl() }}" class="button outline">{{ trans('common.cancel') }}</a>
57 <button class="button" type="submit">{{ trans('entities.books_sort_save') }}</button>
64 <main class="card content-wrap auto-height sticky-top-m">
65 <h2 class="list-heading">{{ trans('entities.books_sort_show_other') }}</h2>
66 <p class="text-muted">{{ trans('entities.books_sort_show_other_desc') }}</p>
68 @include('entities.selector', ['name' => 'books_list', 'selectorSize' => 'compact', 'entityTypes' => 'book', 'entityPermission' => 'update'])