This is the (not yet) official template collection for the Gii System.
Please enjoy this extension and let us collect as many Templates as possible for other people to enjoy. (haml, smarty, dwoo, twig, ...)
In this first release the gtc can generate an even more full-blown app including the Relation Widget and the CAdvancedArBehavior.
http://code.google.com/p/gii-template-collection/
please enjoy
To use it, simply extract the content of the archive into your application extensions/ directory and configure the templates in the 'generatorPaths' section of the gii Configuration inside your application configuration:
'gii'=>array( 'class'=>'system.gii.GiiModule', 'password'=>'<your gii password>', 'generatorPaths'=>array( 'ext.gtc', // Gii Template Collection ), ),
After that, two new Generators 'FullCrud' and 'FullModel' should be available in your Gii index page.
Please note that the provided CAdvancedArBehavior and the Relation widget will be inserted into your application Configuration automatically after the first use of the Generator.
De, fr, lt, es and pt translations are provided in the vendors/messages directory. To make your Application use them, simply copy them over to the messages/ directory of your Web Application.
Please enjoy this extension and give your feedback at the Google Code Repository, thank you. Of course, any templates are appreciated and just leave a comment or mail thyseus@gmail.com
http://code.google.com/p/gii-template-collection/
Total 20 comments
Is there a documentation on how to use it, or is reverse-engineering the only way?
A lot of effort has been put into gtc the last weeks.
Use git until the next release comes out:
https://github.com/schmunk42/gii-template-collection
Any snapshots available anywhere?
great set of crud templates. Love that a date column automatically adds a CJuiDatePicker to the field. Checkboxes for booleans work well also. Well done.
I ended up going back to standard Gii. The application complained over not finding foreign keys called "id". Even though the key was called "Id" in my DB. I renamed it and it worked. And it does not seem to support varchar primary keys.
Another thing, the models look like skeletons! No relations or anything. Is that correct? Seems a little strange to me.
Will remove them for next release. Still need some cleanup to do.
Its cool since both projects can be used simultanously anyway!
There are new generators. See: http://www.yiiframework.com/extension/yii-generator-collection/
Delete the generators from the "yii class generator suite".
@el chief, The extension is being actively developed, as you can see at http://code.google.com/p/gii-template-collection/updates/list.
If so, please remove from the extensions
Hi, i'm running xampp on windows 7 i've successfully used FullCrud Generator & FullModel Generator
but when i click on Portlet Generator i'm getting this error: _Alias "PortletGenerator.widgets.ddeditor.DDEditor" is invalid. Make sure it points to an existing PHP file._
and when i click on Command Generator i get this error: _Alias "CommandGenerator.widgets.ddeditor.DDEditor" is invalid. Make sure it points to an existing PHP file._
In both the errors, the exception is thrown by this code: throw new CException(Yii::t('yii','Alias "{alias}" is invalid. Make sure it points to an existing PHP file.',array('{alias}'=>$alias)));
from this file: C:\DEV\xampp174b5\public_html\yii\framework\YiiBase.php(310)
Please help me. Thanks.
You should add a test and make sure that models start with a capital letter, otherwise it doesn't work on linux systems although on windows there is no error message.
Using the lastest version of wii and gii template collection i keep getting errors like Property "EquipamentoController.pickleForm" is not defined. and errors regarding widgets.ddeditor.DDEditor when i try to use the functionalities.
Plus we have no documentation to solve doubts.
You are saving me (us) a lot of time!!! GREAT WORK
I can really recommend this set of CRUD templates! Pretty cool stuff, hope it grows ...
And saves us a lot of time.
hey, sorry for posting without complete test, the solution i posted doesn't solve the problem of empty value in dropdownlist, right now i have a little time to try to figure out what is happening so, i'd like to ask you to take a look at this
thanks
regards!
hey!! I've opened a ticket for this
What steps will reproduce the problem? 1. Create two related tables which foreign key is not required 2. Model and Crud them 3. Create a new child and try to update it
What is the expected output? What do you see instead? Expected that the PK field accepts the "none" value, but due to the generated code in the Relation.php object, an exception is raised when you try to update a record which has a non-required foreign key
What version of the product are you using? On what operating system? the latest provided in download section
Please provide any additional information below. The problem can be solved easily by changing line 474 in Relation.php from: [code] array('0' => $this->allowEmpty), [/code]
to [code] array('' => $this->allowEmpty), [/code]
the "0" value in the dropdown is the problem because when you generate a dropdown manually like in $form->dropDownList($model, 'att', CHtml::listData(Related::model()->findAll(),'id','name'), array('empty'=>'None'))
everything works with the Yii resultant dropdown which does not include "0" in the empty value
thats say 0 <> empty so if you try to set "0", MySQL raises an error
regards
Hi, i haven't tested fullmodel&crud with modules yet.
You can always generate your Models into your models/ directory and copy them to your module afterwards, this should work.
I still work on the gtc, fullCrud&Model since there even are some more enhancements (and bugfixes) i would like to release to the public !
create a core module create a FullModel inside core/models
trying to FullCrud application.modules.core.models.User doesn't work
trying crud application.modules.core.models.User works
any ideas?
thanks
now it loaded thx for great extension to gii :)
Leave a comment
Please login to leave your comment.