Code Monkey home page Code Monkey logo

crud-admin-generator's People

Contributors

blag001 avatar cbourgois avatar eboye avatar jonseg avatar kajzur avatar manuelbcd avatar matthieume avatar olso 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  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  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  avatar

crud-admin-generator's Issues

URL issue in /web/

My link is like .../web/tablename but i wanna change it like .../tablename how can i do it I tried bunch of things but not even changing anythink thanks.

Search without request

Surround
foreach ($table_columns as $col) {

        if ($i == 0) {
            $whereClause = " WHERE";
        }

        if ($i > 0) {
            $whereClause = $whereClause . " OR";
        }

        $whereClause = $whereClause . " " . $col . " LIKE '%" . $searchValue . "%'";

        $i = $i + 1;
    }

with if ($searchValue)

Add datetime form controller

Check the "date / datetime" type fields and tabs to create a form with this field type "date / datetime"

$initial_data = array(
            'date_insert' => new \DateTime($row_sql['date_insert']),
);

    $form = $form->add('date_insert', 'date', array('required' => false, 'input'  => 'datetime', 'widget' => 'choice',));

Master/Detail

Hi, I was wondering if there was a way to create a Master/Detail form using this. For example you could have a purchase Order and then you could add serveral products and get the order total.
Thank you!

filter external column in /__TABLENAME__/list'

Now in the gen:

$table_columns = array(
__TABLECOLUMNS_ARRAY__
    );

In my case:

$table_columns = array(
        'id', 
        'content', 
        'tests1_id', 

    );

but we should change it because the list only filter by tests1_id not by external value:

image

Error

After creating my first table "user" and running command "php console generate:admin" I get an error "Parse error: syntax error, unexpected '[' in C:\www\www\admingenerator\web\controllers\user\index.php on line 21" .

Using WAMP on windows and PHP ver 5.3.13.

Thx.

a parameter for route start

Hi,
what is the best way to have the generated pages by 'crud admin generator' answering to the following routes:

/myproj/adm/mytable1
/myproj/adm/mytable2
...
instead of:
/mytable1
/mytable2
...
I did that changing in the table controllers all the:
$app->match('/mytable1/list', function(
in:
$app->match('/myproj/adm/mytable1/list', function(

But it is a tedious task. What about to add a parameter in the generation of code?

Translations and export

Hi,

a customer needed a translated CRUD and an export so I customized your software a bit.

Do you have plans to built in translations and a CSV export?

If you like that features but have no time to develop them I would like to fork this project and send you 2 pull requests for each feature. Just tell me if you would accept them.

Thanks,
Ted

Return Type of data in SQL

Hello! First of all I want to say thank you for such a great job.

The question is:
You have {{ table_column }} that returns the value to the table. Is there any parameter like this to return the Type of the field (for example varchar). It will allow easily to integrate checkboxes/date formats in the table...

Could not install Composer

!/usr/bin/env php

Some settings on your machine make Composer unable to work properly.
Make sure that you fix the issues listed below and run this script again:

The phar extension is missing.
Install it or recompile php without --disable-phar

The openssl extension is missing, which means that secure HTTPS transfers are impossible.
If possible you should enable it or recompile php with --with-openssl

Counting rows by selecting them all??

$recordsTotal = $app['db']->executeQuery("SELECT * FROM __TABLENAME__" . $whereClause . $orderClause)->rowCount()

needs to change like this

$recordsTotal = $app['db']->executeQuery("SELECT count(*) as cn FROM __TABLENAME__" . $whereClause . $orderClause)->fetch()['cn'];

[BUG] Table with primary key on multiple columns don't show

If you have something like this :

CREATE TABLE IF NOT EXISTS `localiserservice` (
  `service_id` int(10) unsigned NOT NULL,
  `site_id` int(10) unsigned NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
ALTER TABLE `localiserservice` ADD PRIMARY KEY (`service_id`,`site_id`);

CREATE TABLE IF NOT EXISTS `service` (
  `id_service` int(10) unsigned NOT NULL,
  `srv_libelle` varchar(100) NOT NULL,
  `srv_description` text
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
ALTER TABLE `service` ADD PRIMARY KEY (`id_service`);

CREATE TABLE IF NOT EXISTS `site` (
  `id_site` int(10) unsigned NOT NULL,
  `sit_libelle` varchar(100) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
ALTER TABLE `site` ADD PRIMARY KEY (`id_site`);

(sorry for the French)
console generate:admin only generate 2 of the 3 tables, localiserservice is missing... :-/

Not working on Firefox 31.0

Hi

My custom version is coming along nicely but I have had to move over to my netbook (screen resolution 1024x600) due to persistent BSOD's on my main laptop. As a result of this I have found that the drop down menus in the left pane do not work correctly on Firefox v31.0 i.e. the menu option does not expand when clicked - It works correctly on both IE and Chrome. I have tried the latest version Admin LTE from GitHub which you say crud admin is based on and that works fine on all browsers. Any ideas what the problem may be.

Derek

Blob fields not supported

Hello again, I would like to continue reporting some bugs or possible improvements.

After generating backend, panels does not load (js error) if database has any blob fields. If I edit controller and comment blob fields, the problem is solved.

Regards

Cannot view list and create

Hi,

I have setup crud-admin-generator on a Ubuntu 14.04 with Apache2 and MySQL. Everything is working fine and i can see the tables in the dashboard. But when i expand a table (in this case named prd) and click List or Create i receive "The requested URL /prd was not found on this server"

What could be wrong ?

/Jimmy

Installation error on mac, xampp

I'm following your installation steps, but when I write "php composer.phar install" I'm getting this error :
screen shot 2014-11-03 at 11 40 13 pm

What's wrong? What can I do?

Thank you :)

DataTables warning ; table id=Biens_list Ajax error

And at the end of the error message, I have : ' See : http://datatables.net/tn/7

According the console in google chrome developper tool, I have :
'GET http://crudadmin.local/biens/list?draw=2&co ...(very long string) ... 414 (Request-URI Too Long)' .... jquery.min.js:6

So I reconfigure apache with a larger value for LimitRequestLine without success.

If I reduce the field number in the table, I have no error.
So How I can "increase" this field number in a table

Any help appreciated. Thanks

(question) Add doctrine ORM good or bad decision?

I have done a lot of test adding doctrine ORM inside this project but I don't know if in this case will be good or bad. In this case we will transform dinamically into statically or strong typed.

It would require:

1rst way:
Change the base controller adding queryBuilder (more typed) instead nomal queries (http://doctrine-orm.readthedocs.org/projects/doctrine-orm/en/latest/reference/query-builder.html)

We would need to create the query builder in console.php

2nd way:
Change the base controller adding DQL SELECT (http://doctrine-orm.readthedocs.org/projects/doctrine-orm/en/latest/reference/dql-doctrine-query-language.html) (select via object/typed .More similar than normal queries) instead nomal queries

We could add via replaces in console.php or only changing the base.

3rd way:
Change doctrine/dbal for native-sql doctrine/orm only the bases (http://doctrine-orm.readthedocs.org/projects/doctrine-orm/en/latest/reference/native-sql.html). It will allow to add via 1rst way in custom methods/pages... It could be a good decision

What do you think @jonseg ?

Something seems to be wrong

idk why but... after i finished the installation the dashboard appears without design, please help me
captura de pantalla 15

thanks in advance

Relations?

Relations are planned? Out of the box saw

404 on clicking on a table

Hi all,

I have set up crud admin for a database. It loads the home page fine, but as soon as i click on a database table and select either list or create, the server throws a 404 error saying that the directory /crud-admin-path/table-name was not found.

This is my config:

Alias /outdoorparadise /var/www/crud_admin/web
<VirtualHost *:80>
    DocumentRoot /var/www/crud_admin/web
    DirectoryIndex index.php
    <Directory "/var/www/crud_admin/web">
        Options Indexes MultiViews FollowSymLinks
        Order Allow,Deny
        Allow from all
        AllowOverride all
        <IfModule mod_php5.c>
           php_admin_flag engine on
           php_admin_flag safe_mode off
           php_admin_value open_basedir none
        </ifModule>
   </Directory>
</VirtualHost>

It doesnt matter if I run it on localhost or on a real server as shown below:
image

Forms not validating

Hey, I just make admin panel via generator. Problem is

$form = $form->add('title', 'text', array('required' => true));

In page form element required="required", but when I deleted it with chrome and send empty field it accepts. Thank you

T_FUNCTION error

I'm getting "Parse error: syntax error, unexpected T_FUNCTION in "/example_path/to/../base.php on line 22" when try to access the installed directory. On my localhost the installation went ok...

Is this a php version issue?

Unindentified variable

I have problem getting list of from created table. In dev. tools I can see notice/error in web/controllers/table_name/index.php on line 87 "$queryData->draw = $draw;" - it says that "draw" is undefined variable. (after deleting this line, everything works)

Also on line 37 in the same file I fixed this (after getting notices):

$searchValue = $search[value];

to this:

$searchValue = $search['value'];

And on line 42 this:

$orderClause = " ORDER BY ". $columns[(int)$orderValue[column]][data] . " " . $orderValue[dir];

to this:

$orderClause = " ORDER BY ". $columns[(int)$orderValue['column']]['data'] . " " . $orderValue['dir'];

Not coping well with nginx

Hi there,

Moved to nginx recently. Using this config but still when moving to example.com/someTable the 404 is thrown by nginx. Any ideas?

server {
    listen 80;
    listen [::]:80;

    server_name example.com;

    root /var/www/example.com/web;
    index index.php;

    allow all;
    disable_symlinks off;
    autoindex on;

    location / {
            try_files $uri $uri/ =404;
    }

    location ~ \.php$ {
            try_files $uri =404;
            fastcgi_pass unix:/var/run/php5-fpm.sock;
            fastcgi_index index.php;
            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
            fastcgi_param PHP_FLAG "engine=on";
            fastcgi_param PHP_FLAG "safe_mode=off";
            fastcgi_param PHP_VALUE "open_basedir=none";
            include fastcgi_params;
    }
}

Spaces in column gives me Ajax error and 500 (Internal Server Error)

As soon as I have a space in column name, for example "End of Life" I'm geting this error when entering the List page;

"DataTables warning: table id=inventory_list - Ajax error. For more information about this error, please see http://datatables.net/tn/7"

When I remove the space it works. It doesn't look too good having to use "End_of_Life" for list page to work. Is it possible to have the list page to resolve underscores as spaces?

Thanks

Edit: Actually the Create page resolves underscores to spaces. And my column ISV_Account_Name resolves to "I s v account name", little bit weird? :P

Read access?

Your installation instructions say to clone the repo, but it appears I don't have permissions?

$ git clone [email protected]:jonseg/crud-admin-generator.git admingenerator
Cloning into 'admingenerator'...
Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

How are we supposed to get a copy of this?

Edit: Nevermind. https://github.com/jonseg/crud-admin-generator works. You might consider re-writing your installation instructions.

Lot of "deprecated" alerts on edit and update

Hello, I'm facing some problems creating crud forms. I can navigate through views but if y edit or update any row, get lot of messages like these:

Deprecated: ValidatorInterface was deprecated in version 2.5 and will be removed in version 3.0. Please use Validator\ValidatorInterface instead. in C:\MYPATH\htdocs\admin-generator\vendor\symfony\validator\Symfony\Component\Validator\ValidatorInterface.php on line 14

Deprecated: The "Symfony\Component\Validator\MetadataFactoryInterface" interface is deprecated since version 2.5 and will be removed in Symfony 3.0. You should use the "Symfony\Component\Validator\Mapping\Factory\MetadataFactoryInterface" interface instead. in C:\MYPATH\htdocs\admin-generator\vendor\symfony\validator\Symfony\Component\Validator\MetadataFactoryInterface.php on line 14

Deprecated: The "Symfony\Component\Validator\Mapping\ElementMetadata" class was deprecated in version 2.5 and will be removed in 3.0. Use "Symfony\Component\Validator\Mapping\GenericMetadata" instead. in C:\MYPATH\htdocs\admin-generator\vendor\symfony\validator\Symfony\Component\Validator\Mapping\ElementMetadata.php on line 14

Deprecated: Symfony\Component\Validator\MetadataInterface was deprecated in version 2.5 and will be removed in 3.0. Use Symfony\Component\Validator\Mapping\MetadataInterface instead. in C:\MYPATH\htdocs\admin-generator\vendor\symfony\validator\Symfony\Component\Validator\MetadataInterface.php on line 14

... ( and more ) ...

HELP: Installation

Hi, can you help me with the installation? I've cloned it on github, then i don't know the curl and installing vendor. Sorry i don't know much about it, is there a portable version that i just copy to my htdocs folder?

Thanks.

issuess with the db connecction

I have this errors:

[Doctrine\DBAL\Exception\ConnectionException]
An exception occured in driver: SQLSTATE[HY000] [2002] Connection refused

[Doctrine\DBAL\Driver\PDOException]
SQLSTATE[HY000] [2002] Connection refused

[PDOException]
SQLSTATE[HY000] [2002] Connection refused

my database options are:

    'dbs.options' => array(
        'db' => array(
            'driver'   => 'pdomysql',
            'dbname'   => 'backend',
            'host'     => 'localhost',
            'user'     => 'root',
            'password' => 'root',
            'charset'  => 'utf8',
        ),
    )

));

Some question about admin generator.

Some question about AG strategy:

  • why you preferred to place controllers and views folder in web folder instead of in src folder?
  • what about localization? What's the best way to do it?
  • why the procedural approach, instead of object oriented one in controllers implementation?

php console not working on mac..

Good Day, i try to use this excellent tool, but on my mac with MAMP and php 5.4.30 i get the follow errors, i really appreciate any help.. or there is a web interface?

thanks
PHP CONFIGURATION
screen shot 2014-09-27 at 2 04 07 pm

PHP ERRORS
screen shot 2014-09-27 at 2 04 16 pm

admin generator not working

Hello Team,

we have followed all the steps, when we run php console admin generator, web page shows all the tables of the DB, but console/panel doesnt generate.

Please help!

Best regards,
Vijay

documentation

Hi,
I've been trying to play with your app but I couldn't solve a problem I'm having to use it, I don't know if there's some misconfiguration or requirement I need to have but it's not in the guide? Like activate mod rewrite in apache2? I do it but it didn't solve my problem...

The app loads the main page ok, but when I try to play with de database shows me an error:

The requested URL /Invoices_client was not found on this server.

Any help? clue? solution?

routing issue when viewing tables

ive been experiencing issues viewing the tables and their data. I referred to a now closed issue (#23) but applying those changes did not solve my issue.

When entering http://localhost/sat-join-us/crudAdmin/admingenerator/web//itinerary (this is the link that the >>list links to) into the url i get an object not found 404 error,

but when i enter http://localhost/sat-join-us/crudAdmin/admingenerator/web/index.php/itinerary the tables load.

Any idea where ive gone wrong?

generate:admin not generating views

I'm following the installation instructions exactly, but at the point where I run

php console generate:admin

It will not generate the views for my database tables. The command does not output any error and the database connection is OK. The website is generated successfully (actually it is working before the generate command).

Am I missing something to do which is not in the installation instruction or is a php requirement missing ?

here my commands I'm excuting:

git clone https://github.com/jonseg/crud-admin-generator.git admingenerator
cd admingenerator
curl -sS https://getcomposer.org/installer | php
php composer.phar install
edit src/app.php and fill in db-data, leaving /resources as it is
create nginx virtualhost pointing root to admingenerator/web/ -> admin website is working at this point correctly
php console generate:admin -> nothing happens, not even with -vvv (verbose) any output -> still no views for my tables

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.