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
Documentation ¶
Requirements ¶
- Yii 1.1.2 (first release of gii)
Installation ¶
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/
Change Log ¶
May 22, 2010 ¶
- Initial release.
Can't use it right
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.
Thanks
You are saving me (us) a lot of time!!!
GREAT WORK
Great work!
I can really recommend this set of CRUD templates!
Pretty cool stuff, hope it grows ...
Works like a charm
And saves us a lot of time.
the solution i wrote doesn't solved
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!
Empty value in dropdownlist should be really empty not zero
hey!! I've opened a ticket for this
What steps will reproduce the problem?
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
FullModel&FullCrud not yet tested with modules
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 !
is it a bug?
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
arrrr
now it loaded thx for great extension to gii :)
docs plz
Where is the documentation ? :)
Model needs to start with capital letter
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.
CException
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\publichtml\yii\framework\YiiBase.php(310)
Please help me.
Thanks.
Have you abandonded this project?
If so, please remove from the extensions
The extension is active
@el chief,
The extension is being actively developed, as you can see at http://code.google.com/p/gii-template-collection/updates/list.
CException
There are new generators. See: http://www.yiiframework.com/extension/yii-generator-collection/
Delete the generators from the "yii class generator suite".
@volkmar
Will remove them for next release. Still need some cleanup to do.
Its cool since both projects can be used simultanously anyway!
Problems and questions
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.
thanks!
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.
Snapshots?
Any snapshots available anywhere?
Use git until the next release comes out
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
docs
Is there a documentation on how to use it, or is reverse-engineering the only way?
Alias "gii-template-collection.components.CSaveRelationsBehavior" is invalid
FullModel generation worked without issue but I'm getting this error when I try to Generate FullCRUD with any template:
Alias "gii-template-collection.components.CSaveRelationsBehavior" is invalid. Make sure it points to an existing directory or file.
Extension installed manually and '/protected/extensions/gii-template-collection/components/CSaveRelationsBehavior.php' definately exists. Any ideas what's going wrong?
Tried both gii-template-collection-0.10.1.zip and gii-template-collection-development.zip - they give same error.
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.