I’ve uploaded a new extension called AweCrud, the tries to simplify and enhance the code generation using Gii and Bootstrap look-and-feel.
For more information:
I’ve uploaded a new extension called AweCrud, the tries to simplify and enhance the code generation using Gii and Bootstrap look-and-feel.
For more information:
Hi, thank you for sharing your work.
Two errors I’m facing:
While using AweModel generator, when a table has a "created_at" field, the generator return a CException:
Property "AweModelCode.create_time" is not defined.
in:
extensions/AweCrud/generators/AweModel/AweModelCode.php(408)
While using CRUD generator, I’ve got “PHP Notice”:
Undefined variable: identificationColumn
in:
extensions/AweCrud/generators/AweCrud/templates/default/_view.php(32)
Hi Luc,
Please download the latest version. Just uploaded a new version fixing lots of bugs (including the one you mention).
Thanks for helping to test.
Best regards.
hi, thanks for reply.
With the new version, the first issue was solved, but not the second one. REmoving the code related with "identificationColumn" in extensions/AweCrud/generators/AweCrud/templates/default/_view.php(32) did the trick (but how dirty !)
BTW, I’ve modified the menu array declaration in all the views generators to looks like:
$this->menu=array(
array('label' =>Yii::t('AweCrud.app', 'List').' '.<?= $this->modelClass ?>::label(2), 'icon'=>'list' ,'url' => array('index')),
array('label' =>Yii::t('AweCrud.app', 'Create').' <?= $this->modelClass ?>', 'icon'=>'plus' , 'url' => array('create')),
array('label' =>Yii::t('AweCrud.app', 'Update'), 'icon'=>'pencil','url' => array('update','id' => $model-><?php echo $this->tableSchema->primaryKey; ?>)),
array('label' =>Yii::t('AweCrud.app', 'Delete'), 'icon'=>'trash', 'url'=>'#', 'linkOptions' => array('submit' => array('delete', 'id' => $model-><?php echo $this->tableSchema->primaryKey; ?>), 'confirm' => Yii::t('AweCrud.app', 'Are you sure you want to delete this item?'))),
array('label' =>Yii::t('AweCrud.app', 'Manage'), 'icon'=>'list-alt','url' => array('admin')),
);
So it looks good when calling the menu in column2 layout with:
$this->widget('bootstrap.widgets.TbMenu', array(
'type'=>'list',
'items'=>$this->menu,
));
same problem :
Undefined variable: identificationColumn
you’re welcome
no kidding now: thank you
Feel free to report any bug you find. Thank you too!
Awecms
this class can’t find
Fixing … please take a look in a few minutes at bitbucket…
New version released. Please check it out!
Feel free to report any bug.
I’m encountering problems in gii AweCrud generator function.
When I click "preview" using a Model generated with AweCrud model function I have this error:
La proprietà "CPhpMessageSource"."extensionPaths" non è definita.
Property "CPhpMessageSource"."extensionPaths" is not defined
I’m up to date at the latest version of AweCrud (24/10 version) and current bootstrap and booster.
Attached you can see the screenshot
Thank you in advance
Daniele
I tried also to remove these lines from configuration:
‘messages’ => array (
'extensionPaths' => array(
'AweCrud' => 'ext.AweCrud.messages', // AweCrud messages directory.
),
),
I obtain another error “include(AweCrud.php) [<a href=‘function.include’>function.include</a>]: failed to open stream: No such file or directory” related to, reading the stacktrace, this line:
$passwordI18n = Yii::t('AweCrud.app', 'password');
Oh, right, in the README file you can find the solution…
You need to add in config/main.php file in the "components" section:
'messages' => array(
// 'class' => 'MessageSource',
'extensionPaths' => array(
'AweCrud' => 'ext.AweCrud.messages', // AweCrud messages directory.
),
),
Also, please check you are using the last version of Yii… theoretically AweCrud might work on Yii 1.1.9, but I’ve only tested on version 1.1.12.
Nevertheless, please download the last version, in order to make sure all the detected bugs also are fixed.
Thank you for the prompt answer.
Still same problems.
I have latest Yii version 1.1.12, latest YiiBooster, latest YiiBoostrap, and your latest 0.6 version of awecrud.
The problems are the same told before, with the messages configuration as in readme:
Property "CPhpMessageSource"."extensionPaths" is not defined
Without:
include(AweCrud.php) [<a href=‘function.include’>function.include</a>]: failed to open stream: No such file or directory" related to, reading the stacktrace, this line:
$passwordI18n = Yii::t(‘AweCrud.app’, ‘password’);
It’s very strange, I also tried to add the app file in italian messages but no results.
Just found the reason of the bug.
In order to use i18n in AweCrud is necessary that you upgrade to the latest Yii dev version. Download Last Yii Dev Version
OOK RICARDO thank you.
It works.
Using the developing version of yii and configuring messages as in readme:
'messages' => array(
// 'class' => 'MessageSource',
'extensionPaths' => array(
'AweCrud' => 'ext.AweCrud.messages', // AweCrud messages directory.
),
),
Bye,
Daniele
If you experience any other issue, please let me know.