Yii 1.1: gii-template-collection

This is the (not yet) official Gii template Collection
41 followers

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.

Total 20 comments

#14447 report it
GPCola at 2013/08/12 01:31pm
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.

#6403 report it
avner at 2012/01/07 12:20pm
docs

Is there a documentation on how to use it, or is reverse-engineering the only way?

#5476 report it
thyseus at 2011/10/15 02:41am
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

#5469 report it
cass at 2011/10/14 09:40am
Snapshots?

Any snapshots available anywhere?

#4436 report it
huanito at 2011/07/08 07:43pm
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.

#3689 report it
jrewing at 2011/04/28 10:01am
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.

#3580 report it
thyseus at 2011/04/20 04:09am
@volkmar

Will remove them for next release. Still need some cleanup to do.

Its cool since both projects can be used simultanously anyway!

#3572 report it
volkmar at 2011/04/19 04:53pm
CException

There are new generators. See: http://www.yiiframework.com/extension/yii-generator-collection/

Delete the generators from the "yii class generator suite".

#3438 report it
Rodrigo Coelho at 2011/04/13 04:08am
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.

#2776 report it
el chief at 2011/02/09 04:47pm
Have you abandonded this project?

If so, please remove from the extensions

#2775 report it
zxcqwe at 2011/02/09 02:31pm
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\public_html\yii\framework\YiiBase.php(310)

Please help me. Thanks.

#2578 report it
dickreuter at 2011/01/18 09:23pm
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.

#31 report it
Peter Thorun at 2010/10/07 10:34am
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.

#49 report it
Juan Pablo Sala at 2010/10/04 12:10pm
Thanks

You are saving me (us) a lot of time!!! GREAT WORK

#119 report it
schmunk at 2010/09/07 01:29pm
Great work!

I can really recommend this set of CRUD templates! Pretty cool stuff, hope it grows ...

#128 report it
Rodrigo Coelho at 2010/09/02 09:47am
Works like a charm

And saves us a lot of time.

#260 report it
Junior - df9 at 2010/07/25 09:51pm
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!

#261 report it
Junior - df9 at 2010/07/25 09:44pm
Empty value in dropdownlist should be really empty not zero

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

#327 report it
thyseus at 2010/07/08 05:06pm
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 !

#330 report it
Junior - df9 at 2010/07/07 12:06pm
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

Leave a comment

Please to leave your comment.

Create extension
  • Yii Version: 1.1
  • License: Other Open Source License
  • Developed by: thyseus
  • Category: Others
  • Votes: +30 / -2
  • Downloaded: 5,029 times
  • Created on: May 22, 2010
  • Last updated: May 22, 2010