Bladeren bron

update README, add missing type

Thomas 14 jaren geleden
bovenliggende
commit
e0e3e92a69
6 gewijzigde bestanden met toevoegingen van 65 en 18 verwijderingen
  1. 8 0
      Admin/Admin.php
  2. 22 0
      CREDITS
  3. 1 1
      LICENSE
  4. 12 17
      README.md
  5. 11 0
      Resources/views/CRUD/list_many_to_many.twig
  6. 11 0
      Resources/views/CRUD/list_one_to_many.twig

+ 8 - 0
Admin/Admin.php

@@ -305,6 +305,14 @@ abstract class Admin extends ContainerAware
                     ->getConfigurationByClass($this->list_fields[$name]['targetEntity']);
             }
 
+            if($this->list_fields[$name]['type'] == \Doctrine\ORM\Mapping\ClassMetadataInfo::ONE_TO_MANY) {
+                $this->list_fields[$name]['template']       = 'BaseApplicationBundle:CRUD:list_one_to_many.twig';
+            }
+
+            if($this->list_fields[$name]['type'] == \Doctrine\ORM\Mapping\ClassMetadataInfo::MANY_TO_MANY) {
+                $this->list_fields[$name]['template']       = 'BaseApplicationBundle:CRUD:list_many_to_many.twig';
+            }
+
             // define the default template
             if(!isset($this->list_fields[$name]['template'])) {
                 $this->list_fields[$name]['template'] = sprintf('BaseApplicationBundle:CRUD:list_%s.twig', $this->list_fields[$name]['type']);

+ 22 - 0
CREDITS

@@ -0,0 +1,22 @@
+
+* Django Project (http://www.djangoproject.com/)
+
+  The Admin class architecture is inspired by the Django Admin.
+  You can find more information about the django admin definition
+  here : http://www.djangobook.com/en/1.0/chapter06/
+
+
+* FamFamFam (http://www.famfamfam.com/lab/icons/silk/)
+
+  The icon used the famous icons library by Mark James.
+
+  licence : http://creativecommons.org/licenses/by/2.5/
+
+* jQuery (http://jquery.com/)
+
+  The javascript library used to integrate Ajax and GUI interactions.
+
+* qTip (http://craigsworks.com/projects/qtip/)
+
+  The javascript library used to display notification and errors messages.
+  

+ 1 - 1
LICENSE

@@ -1,6 +1,6 @@
 The MIT License
 
-Copyright (c) 2010 thomas.rabaix@sonata-project.org
+Copyright (c) 2010-2011 thomas.rabaix@sonata-project.org
 
 Permission is hereby granted, free of charge, to any person obtaining a copy
 of this software and associated documentation files (the "Software"), to deal

+ 12 - 17
README.md

@@ -1,24 +1,19 @@
 Prototype to easily create uniform backend application
+======================================================
 
-## Installation
+Please read the related documentation in the docs folder.
 
-### Add BaseApplicationBundle to your src/Bundle dir
+*WARNING* : this is a prototype, and not a final/stable bundle.
 
-    git submodule add git@github.com:sonata-project/BaseApplicationBundle.git src/Bundle/BaseApplicationBundle
+   - code can be irrelevant
+   - code might not use properly Symfony2 or Doctrine components
+   - code might change with no notices.
 
-### Add EasyExtendsBundle to your application kernel
 
-    // app/AppKernel.php
-    public function registerBundles()
-    {
-        return array(
-            // ...
-            new Bundle\BaseApplicationBundle\BaseApplicationBundle(),
-            // ...
-        );
-    }
+TODO :
 
-
-### Add this line into your config.yml file 
-
-    base_application.config: ~
+   - use the admin class to register route information
+   - save filter criteria
+   - export list
+   - edit group field
+   - add inline editing (Invoice with InvoiceLine)

+ 11 - 0
Resources/views/CRUD/list_many_to_many.twig

@@ -0,0 +1,11 @@
+{#
+
+This file is part of the Sonata package.
+
+(c) Thomas Rabaix <thomas.rabaix@sonata-project.org>
+
+For the full copyright and license information, please view the LICENSE
+file that was distributed with this source code.
+
+#}
+

+ 11 - 0
Resources/views/CRUD/list_one_to_many.twig

@@ -0,0 +1,11 @@
+{#
+
+This file is part of the Sonata package.
+
+(c) Thomas Rabaix <thomas.rabaix@sonata-project.org>
+
+For the full copyright and license information, please view the LICENSE
+file that was distributed with this source code.
+
+#}
+