mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-08-07 23:03:00 +03:00
Sorting: Improved sort set display, delete, added action on edit
- Changes to a sort set will now auto-apply to assinged books (basic chunck through all on save). - Added book count indicator to sort set list items. - Deletion now has confirmation and auto-handling of assigned books/settings.
This commit is contained in:
@@ -16,6 +16,15 @@ class BookSorter
|
||||
) {
|
||||
}
|
||||
|
||||
public function runBookAutoSortForAllWithSet(SortSet $set): void
|
||||
{
|
||||
$set->books()->chunk(50, function ($books) {
|
||||
foreach ($books as $book) {
|
||||
$this->runBookAutoSort($book);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Runs the auto-sort for a book if the book has a sort set applied to it.
|
||||
* This does not consider permissions since the sort operations are centrally
|
||||
|
Reference in New Issue
Block a user