mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-04-12 16:08:08 +00:00
Extracted text & added dropdown for book sort move actions
Primarily styling and testing left to do.
This commit is contained in:
parent
7cacbaadf0
commit
40e112fc5b
4 changed files with 34 additions and 14 deletions
resources
|
@ -150,7 +150,16 @@ return [
|
|||
'books_sort_chapters_last' => 'Chapters Last',
|
||||
'books_sort_show_other' => 'Show Other Books',
|
||||
'books_sort_show_other_desc' => 'Add other books here to include them in the sort operation, and allow easy cross-book reorganisation.',
|
||||
'books_sort_save' => 'Save New Order',
|
||||
'books_sort_move_up' => 'Move Up',
|
||||
'books_sort_move_down' => 'Move Down',
|
||||
'books_sort_move_prev_book' => 'Move To Previous Book',
|
||||
'books_sort_move_next_book' => 'Move To Next Book',
|
||||
'books_sort_move_prev_chapter' => 'Move Into Previous Chapter',
|
||||
'books_sort_move_next_chapter' => 'Move Into Next Chapter',
|
||||
'books_sort_move_book_start' => 'Move To Start of Book',
|
||||
'books_sort_move_book_end' => 'Move To End of Book',
|
||||
'books_sort_move_before_chapter' => 'Move To Before Chapter',
|
||||
'books_sort_move_after_chapter' => 'Move To After Chapter',
|
||||
'books_copy' => 'Copy Book',
|
||||
'books_copy_success' => 'Book successfully copied',
|
||||
|
||||
|
|
|
@ -232,7 +232,7 @@
|
|||
}
|
||||
|
||||
// Sortable Lists
|
||||
.sortable-page-list, .sortable-page-list ul {
|
||||
.sortable-page-list, .sortable-page-sublist {
|
||||
list-style: none;
|
||||
}
|
||||
.sort-box {
|
||||
|
@ -278,7 +278,7 @@
|
|||
> ul {
|
||||
margin-inline-start: 0;
|
||||
}
|
||||
ul {
|
||||
.sortable-page-sublist {
|
||||
margin-bottom: $-m;
|
||||
margin-top: 0;
|
||||
padding-inline-start: $-m;
|
||||
|
|
|
@ -1,12 +1,23 @@
|
|||
<div class="sort-box-actions">
|
||||
<button type="button" data-move="up">Move Up</button>
|
||||
<button type="button" data-move="down">Move Down</button>
|
||||
<button type="button" data-move="prev_book">Move To Previous Book</button>
|
||||
<button type="button" data-move="next_book">Move To Next Book</button>
|
||||
<button type="button" data-move="prev_chapter">Move Into Previous Chapter</button>
|
||||
<button type="button" data-move="next_chapter">Move Into Next Chapter</button>
|
||||
<button type="button" data-move="book_start">Move To Start of Book</button>
|
||||
<button type="button" data-move="book_end">Move To End of Book</button>
|
||||
<button type="button" data-move="before_chapter">Move To Before Chapter</button>
|
||||
<button type="button" data-move="after_chapter">Move To After Chapter</button>
|
||||
<button type="button" data-move="up" title="{{ trans('entities.books_sort_move_up') }}">@icon('chevron-up')</button>
|
||||
<button type="button" data-move="down"
|
||||
title="{{ trans('entities.books_sort_move_down') }}">@icon('chevron-down')</button>
|
||||
<div class="dropdown-container" component="dropdown">
|
||||
<button refs="dropdown@toggle"
|
||||
title="{{ trans('common.more') }}"
|
||||
aria-haspopup="true"
|
||||
aria-expanded="false">
|
||||
@icon('more')
|
||||
</button>
|
||||
<div refs="dropdown@menu" class="dropdown-menu" role="menu">
|
||||
<button type="button" class="text-item" data-move="prev_book">{{ trans('entities.books_sort_move_prev_book') }}</button>
|
||||
<button type="button" class="text-item" data-move="next_book">{{ trans('entities.books_sort_move_next_book') }}</button>
|
||||
<button type="button" class="text-item" data-move="prev_chapter">{{ trans('entities.books_sort_move_prev_chapter') }}</button>
|
||||
<button type="button" class="text-item" data-move="next_chapter">{{ trans('entities.books_sort_move_next_chapter') }}</button>
|
||||
<button type="button" class="text-item" data-move="book_start">{{ trans('entities.books_sort_move_book_start') }}</button>
|
||||
<button type="button" class="text-item" data-move="book_end">{{ trans('entities.books_sort_move_book_end') }}</button>
|
||||
<button type="button" class="text-item" data-move="before_chapter">{{ trans('entities.books_sort_move_before_chapter') }}</button>
|
||||
<button type="button" class="text-item" data-move="after_chapter">{{ trans('entities.books_sort_move_after_chapter') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -36,7 +36,7 @@
|
|||
</div>
|
||||
@include('books.parts.sort-box-actions')
|
||||
@if($bookChild->isA('chapter'))
|
||||
<ul>
|
||||
<ul class="sortable-page-sublist">
|
||||
@foreach($bookChild->visible_pages as $page)
|
||||
<li class="text-page"
|
||||
data-id="{{$page->id}}" data-type="page"
|
||||
|
|
Loading…
Add table
Reference in a new issue