Awecrud A new way to generate code
#1
Posted 16 October 2012 - 11:07 PM
For more information:
http://www.yiiframew...ension/awecrud/
YiiFramework en Español - http://yiiframework.co/ - http://yiiframeworkenespanol.org/ - Yii Code Generator for Bootstrap
http://obregon.co/
PHP 5.3+, nginx 1.2, MySQL, MariaDB, PerconaDB, PostgreSQL, Yii 1.x-dev.
Follow me: @robregonm & @obregonco.
#2
Posted 19 October 2012 - 05:53 AM
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: identificationColumnin:
extensions/AweCrud/generators/AweCrud/templates/default/_view.php(32)
Let's go !
#3
Posted 19 October 2012 - 10:20 AM
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.
YiiFramework en Español - http://yiiframework.co/ - http://yiiframeworkenespanol.org/ - Yii Code Generator for Bootstrap
http://obregon.co/
PHP 5.3+, nginx 1.2, MySQL, MariaDB, PerconaDB, PostgreSQL, Yii 1.x-dev.
Follow me: @robregonm & @obregonco.
#4
Posted 19 October 2012 - 05:21 PM
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,
));
Let's go !
#6
Posted 22 October 2012 - 12:38 PM
Fixed in the last version. Thanks for reporting
YiiFramework en Español - http://yiiframework.co/ - http://yiiframeworkenespanol.org/ - Yii Code Generator for Bootstrap
http://obregon.co/
PHP 5.3+, nginx 1.2, MySQL, MariaDB, PerconaDB, PostgreSQL, Yii 1.x-dev.
Follow me: @robregonm & @obregonco.
#7
Posted 22 October 2012 - 12:55 PM
robregonm, on 22 October 2012 - 12:38 PM, said:
Fixed in the last version. Thanks for reporting
you're welcome
no kidding now: thank you
Let's go !
#8
Posted 22 October 2012 - 01:01 PM
YiiFramework en Español - http://yiiframework.co/ - http://yiiframeworkenespanol.org/ - Yii Code Generator for Bootstrap
http://obregon.co/
PHP 5.3+, nginx 1.2, MySQL, MariaDB, PerconaDB, PostgreSQL, Yii 1.x-dev.
Follow me: @robregonm & @obregonco.
#10
Posted 24 October 2012 - 12:11 PM
YiiFramework en Español - http://yiiframework.co/ - http://yiiframeworkenespanol.org/ - Yii Code Generator for Bootstrap
http://obregon.co/
PHP 5.3+, nginx 1.2, MySQL, MariaDB, PerconaDB, PostgreSQL, Yii 1.x-dev.
Follow me: @robregonm & @obregonco.
#11
Posted 24 October 2012 - 03:33 PM
Feel free to report any bug.
YiiFramework en Español - http://yiiframework.co/ - http://yiiframeworkenespanol.org/ - Yii Code Generator for Bootstrap
http://obregon.co/
PHP 5.3+, nginx 1.2, MySQL, MariaDB, PerconaDB, PostgreSQL, Yii 1.x-dev.
Follow me: @robregonm & @obregonco.
#12
Posted 25 October 2012 - 04:52 AM
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
Attached File(s)
-
Cattura.PNG (51.91K)
Number of downloads: 27 -
Cattura2.PNG (83.69K)
Number of downloads: 23 -
Cattura3.PNG (78.16K)
Number of downloads: 15
#13
Posted 25 October 2012 - 05:22 AM
'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');
#14
Posted 25 October 2012 - 07:39 AM
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.
),
),
YiiFramework en Español - http://yiiframework.co/ - http://yiiframeworkenespanol.org/ - Yii Code Generator for Bootstrap
http://obregon.co/
PHP 5.3+, nginx 1.2, MySQL, MariaDB, PerconaDB, PostgreSQL, Yii 1.x-dev.
Follow me: @robregonm & @obregonco.
#15
Posted 25 October 2012 - 07:42 AM
YiiFramework en Español - http://yiiframework.co/ - http://yiiframeworkenespanol.org/ - Yii Code Generator for Bootstrap
http://obregon.co/
PHP 5.3+, nginx 1.2, MySQL, MariaDB, PerconaDB, PostgreSQL, Yii 1.x-dev.
Follow me: @robregonm & @obregonco.
#16
Posted 25 October 2012 - 07:48 AM
YiiFramework en Español - http://yiiframework.co/ - http://yiiframeworkenespanol.org/ - Yii Code Generator for Bootstrap
http://obregon.co/
PHP 5.3+, nginx 1.2, MySQL, MariaDB, PerconaDB, PostgreSQL, Yii 1.x-dev.
Follow me: @robregonm & @obregonco.
#17
Posted 25 October 2012 - 08:21 AM
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.
#18
Posted 25 October 2012 - 08:57 AM
In order to use i18n in AweCrud is necessary that you upgrade to the latest Yii dev version. Download Last Yii Dev Version
YiiFramework en Español - http://yiiframework.co/ - http://yiiframeworkenespanol.org/ - Yii Code Generator for Bootstrap
http://obregon.co/
PHP 5.3+, nginx 1.2, MySQL, MariaDB, PerconaDB, PostgreSQL, Yii 1.x-dev.
Follow me: @robregonm & @obregonco.
#19
Posted 29 October 2012 - 06:14 AM
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
#20
Posted 29 October 2012 - 10:11 AM
YiiFramework en Español - http://yiiframework.co/ - http://yiiframeworkenespanol.org/ - Yii Code Generator for Bootstrap
http://obregon.co/
PHP 5.3+, nginx 1.2, MySQL, MariaDB, PerconaDB, PostgreSQL, Yii 1.x-dev.
Follow me: @robregonm & @obregonco.

Help













