From: Vincent Vanwaelscappel Date: Tue, 25 Jul 2023 10:48:19 +0000 (+0200) Subject: wip #6173 @0.5 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=2b84b1b65869b5fc540fdc8e5a2b8ccad2df4747;p=cubist_cms-back.git wip #6173 @0.5 --- diff --git a/src/app/Console/Commands/GenerateCommand.php b/src/app/Console/Commands/GenerateCommand.php index f6f4f85..e98cf0f 100644 --- a/src/app/Console/Commands/GenerateCommand.php +++ b/src/app/Console/Commands/GenerateCommand.php @@ -55,6 +55,9 @@ class GenerateCommand extends CubistCommand */ public function _generate($model) { + if (! $model->getOption('name')) { + return; + } $this->line('Generate code of ' . get_class($model)); $model->generateCode(); diff --git a/src/app/Console/Commands/MigrateCommand.php b/src/app/Console/Commands/MigrateCommand.php index 669f7b4..04c7f83 100644 --- a/src/app/Console/Commands/MigrateCommand.php +++ b/src/app/Console/Commands/MigrateCommand.php @@ -9,8 +9,7 @@ use Doctrine\DBAL\DriverManager; use Doctrine\DBAL\Schema\Comparator; use Doctrine\DBAL\Schema\Schema; -class MigrateCommand extends CubistCommand -{ +class MigrateCommand extends CubistCommand { /** * The name and signature of the console command. * @@ -32,8 +31,7 @@ class MigrateCommand extends CubistCommand * * @return mixed */ - public function handle() - { + public function handle() { $this->_schema = new Schema(); $this->_handleMagicFolder([$this, '_migrate']); @@ -66,8 +64,10 @@ class MigrateCommand extends CubistCommand /** * @param $model CubistMagicAbstractModel */ - public function _migrate($model) - { + public function _migrate($model) { + if (!$model->getTable()) { + return; + } $this->line('Handling ' . get_class($model)); $res = $model->setSchema($this->_schema); if (null !== $res) { diff --git a/src/app/Magic/Fields/Noteditable.php b/src/app/Magic/Fields/Noteditable.php new file mode 100644 index 0000000..ed2b540 --- /dev/null +++ b/src/app/Magic/Fields/Noteditable.php @@ -0,0 +1,10 @@ + +
+ + @include('crud::inc.field_translatable_icon') + + + {{$v}} + {{-- HINT --}} + @if (isset($field['hint'])) +

{!! $field['hint'] !!}

+ @endif +