From f19d01b296b473e78ebf62addc80868f4b951142 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Wed, 28 Jul 2021 18:38:09 +0200 Subject: [PATCH] wip #4626 @0.5 --- .../Magic/Models/CubistMagicAbstractModel.php | 18 ++++++ src/resources/views/form/shortcuts.blade.php | 63 +++++++++++-------- 2 files changed, 54 insertions(+), 27 deletions(-) diff --git a/src/app/Magic/Models/CubistMagicAbstractModel.php b/src/app/Magic/Models/CubistMagicAbstractModel.php index 03db139..e73f1e1 100644 --- a/src/app/Magic/Models/CubistMagicAbstractModel.php +++ b/src/app/Magic/Models/CubistMagicAbstractModel.php @@ -87,8 +87,16 @@ class CubistMagicAbstractModel extends Model implements HasMedia */ protected $fakeColumns = []; + /** + * @var array + */ protected $additionalEditViews = []; + /** + * @var array + */ + protected $editActions = []; + /** * @var array @@ -888,6 +896,16 @@ class CubistMagicAbstractModel extends Model implements HasMedia $this->additionalEditViews[] = $view; } + public function addEditAction($view) + { + $this->editActions[] = $view; + } + + public function getEditActions() + { + return $this->editActions; + } + public function preCache() { foreach ($this->getFields() as $field) { diff --git a/src/resources/views/form/shortcuts.blade.php b/src/resources/views/form/shortcuts.blade.php index 8b9406a..18a5977 100644 --- a/src/resources/views/form/shortcuts.blade.php +++ b/src/resources/views/form/shortcuts.blade.php @@ -3,36 +3,45 @@ @endsection
- @hasSection('form_shortcut_m') - + #form_shortcuts a { + display: block; + font-size: 120%; + font-weight: 500; + } + - + + @push('after_scripts') + + @endpush + @endif - @endif - - @hasSection('form_below_shortcuts') - @yield('form_below_shortcuts') - @endif + @hasSection('form_below_shortcuts') + @yield('form_below_shortcuts') + @endif
-- 2.39.5