mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-05-31 04:55:50 +08:00
Added bookshelves to breadcrumbs
- Updated breadcrumb dropdown switchers and back-end sibling code to handle new breadcrumbs. - Added breadcrumb view composer and EntityContext system to mangage tracking if in the context of a bookshelf.
This commit is contained in:
@ -3,12 +3,14 @@
|
||||
use Blade;
|
||||
use BookStack\Entities\Book;
|
||||
use BookStack\Entities\Bookshelf;
|
||||
use BookStack\Entities\BreadcrumbsViewComposer;
|
||||
use BookStack\Entities\Chapter;
|
||||
use BookStack\Entities\Page;
|
||||
use BookStack\Settings\Setting;
|
||||
use BookStack\Settings\SettingService;
|
||||
use Illuminate\Database\Eloquent\Relations\Relation;
|
||||
use Illuminate\Http\UploadedFile;
|
||||
use Illuminate\Support\Facades\View;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
use Schema;
|
||||
use Validator;
|
||||
@ -33,7 +35,6 @@ class AppServiceProvider extends ServiceProvider
|
||||
return substr_count($uploadName, '.') < 2;
|
||||
});
|
||||
|
||||
|
||||
// Custom blade view directives
|
||||
Blade::directive('icon', function ($expression) {
|
||||
return "<?php echo icon($expression); ?>";
|
||||
@ -49,6 +50,9 @@ class AppServiceProvider extends ServiceProvider
|
||||
'BookStack\\Chapter' => Chapter::class,
|
||||
'BookStack\\Page' => Page::class,
|
||||
]);
|
||||
|
||||
// View Composers
|
||||
View::composer('partials.breadcrumbs', BreadcrumbsViewComposer::class);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user