Yii Framework Forum: Awecrud - Yii Framework Forum

Jump to content

  • (3 Pages)
  • +
  • 1
  • 2
  • 3
  • You cannot start a new topic
  • You cannot reply to this topic

Awecrud A new way to generate code Rate Topic: -----

#1 User is offline   robregonm 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 539
  • Joined: 30-July 09
  • Location:Colombia

Posted 16 October 2012 - 11:07 PM

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:

http://www.yiiframew...ension/awecrud/
0

#2 User is offline   luc 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 211
  • Joined: 22-June 10
  • Location:france

Posted 19 October 2012 - 05:53 AM

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)
Hey Ho !
Let's go !
1

#3 User is offline   robregonm 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 539
  • Joined: 30-July 09
  • Location:Colombia

Posted 19 October 2012 - 10:20 AM

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.
1

#4 User is offline   luc 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 211
  • Joined: 22-June 10
  • Location:france

Posted 19 October 2012 - 05:21 PM

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,
		));

Hey Ho !
Let's go !
0

#5 User is offline   yiqing95 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 554
  • Joined: 27-December 10
  • Location:china

Posted 20 October 2012 - 12:55 AM

same problem :
Undefined variable: identificationColumn

:lol:
0

#6 User is offline   robregonm 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 539
  • Joined: 30-July 09
  • Location:Colombia

Posted 22 October 2012 - 12:38 PM

@luc @yiqing95
Fixed in the last version. Thanks for reporting :)
0

#7 User is offline   luc 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 211
  • Joined: 22-June 10
  • Location:france

Posted 22 October 2012 - 12:55 PM

View Postrobregonm, on 22 October 2012 - 12:38 PM, said:

@luc @yiqing95
Fixed in the last version. Thanks for reporting :)

you're welcome ;)
no kidding now: thank you
Hey Ho !
Let's go !
0

#8 User is offline   robregonm 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 539
  • Joined: 30-July 09
  • Location:Colombia

Posted 22 October 2012 - 01:01 PM

Feel free to report any bug you find. Thank you too!
;)
0

#9 User is offline   yiqing95 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 554
  • Joined: 27-December 10
  • Location:china

Posted 24 October 2012 - 09:12 AM

Awecms :lol:

this class can't find
0

#10 User is offline   robregonm 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 539
  • Joined: 30-July 09
  • Location:Colombia

Posted 24 October 2012 - 12:11 PM

Fixing ... please take a look in a few minutes at bitbucket... :)
0

#11 User is offline   robregonm 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 539
  • Joined: 30-July 09
  • Location:Colombia

Posted 24 October 2012 - 03:33 PM

New version released. Please check it out!

Feel free to report any bug.
0

#12 User is offline   Daniele Cicognini 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 4
  • Joined: 08-September 11

Posted 25 October 2012 - 04:52 AM

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

Attached File(s)


0

#13 User is offline   Daniele Cicognini 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 4
  • Joined: 08-September 11

Posted 25 October 2012 - 05:22 AM

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');
0

#14 User is offline   robregonm 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 539
  • Joined: 30-July 09
  • Location:Colombia

Posted 25 October 2012 - 07:39 AM

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.
        	),
    	),

0

#15 User is offline   robregonm 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 539
  • Joined: 30-July 09
  • Location:Colombia

Posted 25 October 2012 - 07:42 AM

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.
0

#16 User is offline   robregonm 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 539
  • Joined: 30-July 09
  • Location:Colombia

Posted 25 October 2012 - 07:48 AM

Nevertheless, please download the last version, in order to make sure all the detected bugs also are fixed.
0

#17 User is offline   Daniele Cicognini 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 4
  • Joined: 08-September 11

Posted 25 October 2012 - 08:21 AM

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.
0

#18 User is offline   robregonm 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 539
  • Joined: 30-July 09
  • Location:Colombia

Posted 25 October 2012 - 08:57 AM

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
0

#19 User is offline   Daniele Cicognini 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 4
  • Joined: 08-September 11

Posted 29 October 2012 - 06:14 AM

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
0

#20 User is offline   robregonm 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 539
  • Joined: 30-July 09
  • Location:Colombia

Posted 29 October 2012 - 10:11 AM

If you experience any other issue, please let me know. ;)
0

Share this topic:


  • (3 Pages)
  • +
  • 1
  • 2
  • 3
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users