diff --git a/resources/assets/sass/_lists.scss b/resources/assets/sass/_lists.scss index 19c81066c..c6226f009 100644 --- a/resources/assets/sass/_lists.scss +++ b/resources/assets/sass/_lists.scss @@ -145,26 +145,41 @@ // Sortable Lists .sortable-page-list, .sortable-page-list ul { list-style: none; - background-color: #FFF; } .sort-box { margin-bottom: $-m; - padding: 0 $-l 0 $-l; - border-left: 4px solid $color-book; + border: 2px solid rgba($color-book, 0.6); + padding: $-m $-xl; + border-radius: 4px; +} +.sort-box-options { + display: flex; + flex-wrap: wrap; + justify-content: space-between; +} +.sort-box-options .button { + margin-left: 0; } .sortable-page-list { margin-left: 0; + padding: 0; + .entity-list-item > span:first-child { + align-self: flex-start; + } + .entity-list-item > div { + display: block; + flex: 1; + } > ul { margin-left: 0; } ul { - margin-bottom: 0; + margin-bottom: $-m; margin-top: 0; - box-shadow: 0 0 1px 0 rgba(0, 0, 0, 0.1); + padding-left: $-m; } li { border: 1px solid #DDD; - padding: $-xs $-s; margin-top: -1px; min-height: 38px; &.text-chapter { @@ -278,7 +293,6 @@ ul.pagination { align-items: center; background-color: transparent; border: 0; - cursor: pointer; width: 100%; position: relative; h4 a { @@ -293,14 +307,18 @@ ul.pagination { flex: 1; text-align: left; } - &:hover { + &:not(.no-hover) { + cursor: pointer; + } + &:not(.no-hover):hover { text-decoration: none; background-color: #DDD; border-radius: 4px; } } -.card .entity-list-item:hover { + +.card .entity-list-item:not(.no-hover):hover { background-color: #F2F2F2; } .card .entity-list-item .entity-list-item:hover { diff --git a/resources/lang/en/entities.php b/resources/lang/en/entities.php index bf0e2172d..dffea3e75 100644 --- a/resources/lang/en/entities.php +++ b/resources/lang/en/entities.php @@ -125,6 +125,11 @@ return [ 'books_navigation' => 'Book Navigation', 'books_sort' => 'Sort Book Contents', 'books_sort_named' => 'Sort Book :bookName', + 'books_sort_name' => 'Sort by Name', + 'books_sort_created' => 'Sort by Created Date', + 'books_sort_updated' => 'Sort by Updated Date', + 'books_sort_chapters_first' => 'Chapters First', + 'books_sort_chapters_last' => 'Chapters Last', 'books_sort_show_other' => 'Show Other Books', 'books_sort_save' => 'Save New Order', diff --git a/resources/views/books/sort-box.blade.php b/resources/views/books/sort-box.blade.php index cff3c8984..98f0af87e 100644 --- a/resources/views/books/sort-box.blade.php +++ b/resources/views/books/sort-box.blade.php @@ -1,20 +1,48 @@
-

@icon('book'){{ $book->name }}

+
+ @icon('book') + {{ $book->name }} +
+
+ {{ trans('entities.books_sort_name') }} + {{ trans('entities.books_sort_created') }} + {{ trans('entities.books_sort_updated') }} + {{ trans('entities.books_sort_chapters_first') }} + {{ trans('entities.books_sort_chapters_last') }} +
\ No newline at end of file diff --git a/resources/views/books/sort.blade.php b/resources/views/books/sort.blade.php index 00ab90f4f..4483af35b 100644 --- a/resources/views/books/sort.blade.php +++ b/resources/views/books/sort.blade.php @@ -1,5 +1,7 @@ @extends('simple-layout') +{{--TODO - Load books in via selector interface--}} + @section('body')
@@ -7,7 +9,10 @@
@include('partials.breadcrumbs', ['crumbs' => [ $book, - $book->getUrl('/sort') => trans('entities.books_sort') + $book->getUrl('/sort') => [ + 'text' => trans('entities.books_sort'), + 'icon' => 'sort', + ] ]])
@@ -16,7 +21,7 @@

{{ trans('entities.books_sort') }}

- @include('books/sort-box', ['book' => $book, 'bookChildren' => $bookChildren]) + @include('books.sort-box', ['book' => $book, 'bookChildren' => $bookChildren])
@@ -58,49 +63,66 @@ @stop diff --git a/resources/views/partials/breadcrumbs.blade.php b/resources/views/partials/breadcrumbs.blade.php index d30712530..54d7b74cb 100644 --- a/resources/views/partials/breadcrumbs.blade.php +++ b/resources/views/partials/breadcrumbs.blade.php @@ -12,7 +12,11 @@ {{ $crumb }} - @else + @elseif (is_array($crumb)) + + @icon($crumb['icon']) {{ $crumb['text'] }} + + @elseif($crumb instanceof \BookStack\Entities\Entity) @icon($crumb->getType()){{ $crumb->getShortName() }}