Git Product home page Git Product logo

giix's People

Contributors

rcoelho avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

giix's Issues

Wrong bracket in GxActiveRecord:308

In fillPkColumnNames method

                                                                                                                                                                                                  vvv this bracket wrong
        throw new InvalidArgumentException(Yii::t('giix.messages', 'The count of values in the argument "pk" ({countPk}) does not match the count of columns in the composite PK ({countColumns}).'), array(
            '{countPk}' => count($pk),
            '{countColumns}' => $columnCount,
        ));

Controller Scaffolding dropDownList forces 0:M relation to be 1:m

Method:
Set up a two linked tables with a nullable relation in database.

model is correctly scaffolded by giix where in rules, you can see that the relation is not marked as required.

When scaffolding the controller/view, does not add a null option to the top of the dropdown list because giix is automatically finding all possible attributes, but does not take into consideration if the field is nullable.

echo $form->dropDownList(
    $model, 
    'entity_id', 
    GxHtml::listDataEx(MODEL_NAME::model()->findAllAttributes(null, true))); ?>

User and its behaviors do not have a method or closure named "label".

I've looked everywhere I can on Google and other places for a resolution to this problem, and while I can find several mentions of it, I can't seem to find any resolution. Basically, the problem is this:

  1. I have the Yii User and Rights modules installed and fully functional.
  2. I have Giix installed and fully functional (other than this issue).
  3. I have a model that is related to the User model in the User module.
  4. When I generate the model and CRUD for the related model, I receive an error message stating: User and its behaviors do not have a method or closure named "label".
    I've tried copying the entire attributeLabels() function from the base Model as some have suggested, but that has no effect at all.
    By the way, before I got this far, I got a message that User.php could not be found. I resolved that by adding Yii::import('application.modules.user.models.*'); to the relations() function in the model.
    When I generate the model and CRUD using pure Gii, I have no problems whatsoever, so I have to believe that Giix is at the core of the problem. (I thought about submitting this issue to the User module, but I have a feeling they would send me back to you guys.)
    Again, I looked everywhere for a resolution to this problem and couldn't find one, although many folks seem to be having it. Is there a resolution for this?

Default values in model

What steps will reproduce the problem?

  1. In MySQL, create a table with one or more columns of type TINYINT(1) (intended for boolean), NOT NULL, and set a default value
  2. Use Giix to generate a model

What is the expected output?
The model should have a rule that sets those fields to their respective default values if empty.

What do you see instead?
A rule that sets them to NULL if empty.

What version of giix are you using?
1.9.1

What is your stack (operating system, web server, DBMS, PHP version)? MacOS, Apache2, MySQL 5.1.53, PHP 5.3.6
What version of the Yii Framework are you using? 1.1.9

Please attach your relevant source and configuration files and sql scripts.

CREATE TABLE `community_user` (
  `community_id` varchar(50) NOT NULL COMMENT 'The community',
  `user_id` int(10) unsigned NOT NULL COMMENT 'The existing user',
  `banned` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT 'Defines if a user is banned from this specific community',
  `newsletter` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT 'Is the user subscribed to the newsletter for this community',
  `email_notification` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT 'If the user accepts to receive notifications by email',
  `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'The time the user joined this community',
  PRIMARY KEY (`community_id`,`user_id`),
  KEY `communityuser_user` (`user_id`),
  KEY `community_index` (`community_id`),
  CONSTRAINT `communityuser_user` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Defines which user belongs to which community';

bundle/include translation

An extension should come with translations included.

I am using giix as submodule and dont want to edit the messages folder because then I have to make changes and commit them somewhere that other clones can see those changes as well.

The messages folder should include the translations even if there are currently no translations in any/all languages

Undefined index 'ajax' in performAjaxValidation

giix-components/GxController.php line 160

...
if (Yii::app()->getRequest()->getIsAjaxRequest() && (($form === null) || ($_POST['ajax'] == $form)))
...

change:

($_POST['ajax'] == $form)

to:

(isset($_POST['ajax']) && $_POST['ajax'] == $form)

GiixCrudCode checkbox labels

Hi! In GiixCrudCode class, methods generateGridViewColumn and generateSearchField generates labels for checkbox displays strict in English language. I offer to replace strict labels "No", "Yes" and "All" to Yii:t('app', ...). It'll support multilanguage in extension. Thanks!

Unable to resolve the request "gii/giixModel".

I've downloaded (actually cloned) giix from GitHub to my extensions directory and followed the installation instructions to the letter. At first I tried it without running the CPhpMessageSource.patch because comments seemed to suggest that the issue had been fixed. Then, I got the message "Unable to resolve the request "gii/giixModel" when trying to run GiixModel Generator.

I went back and applied the patch (although it took me quite a while to find CPhpMessageSource.php since I most definitely don't need the i18n functionality). I then tried to run GiixModel Generator again. Again, it gave me the error message Unable to resolve the request "gii/giixModel".

When I tried a "dry-run" on patch CPhpMessageSource.php, it returned the following message (which may be why the problem occurs):

$ patch -p0 --dry-run < CPhpMessageSource.patch
patching file CPhpMessageSource.php
Hunk #1 FAILED at 62.
Hunk #2 FAILED at 94.
2 out of 2 hunks FAILED -- saving rejects to file CPhpMessageSource.php.rej

Any suggestions on what I may be doing wrong or how I can get around this issue? This really looks like a wonderful extension. I would hope that the functionality would be incorporated into the Yii base soon.

Checkbox list on HAS/MANY_MANY

Hi, i'm using this new version and I'm editing it to integrate with the bootstrap existing extension.

In my tests, however, I found that the records displayed by the method generateActiveRelationField (in update action) are not properly trimmed as checkboxes.

Only the first one is "checked".

add phpdoc for variables in views

I would like to see variable documentation in the templates for crud generation like this:

<?php 
/* @var $model User */ 
/* @var $this UserController */
/* @var $form CActiveForm*/
?>

Unable to append MANY_MANY relationship

Hi there,

Just wondering if every time I save a new MANY_MANY relationship model, is it possible to preserve the old data? Each time I insert something new, say a new photo, which is linked by MANY_MANY relationship, the SaveRelated method will automatically remove all my old relation.

It is not practical to include all the data in my form every time when I just need to add something new. Perhaps you can add an "append" option in your SaveWithRelated and SaveRelated function, and use it to stop the deleting process?

I found nother SaveRelated extension from yii before, they are providing this feature where I found it quite useful, Please consider to modify it if possible.

Thank you.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.