Skip to content

Commit

Permalink
update README, add missing type
Browse files Browse the repository at this point in the history
  • Loading branch information
rande committed Jan 3, 2011
1 parent 0d34471 commit e0e3e92
Show file tree
Hide file tree
Showing 6 changed files with 65 additions and 18 deletions.
8 changes: 8 additions & 0 deletions Admin/Admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,14 @@ public function buildListFields()
->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']);
Expand Down
22 changes: 22 additions & 0 deletions CREDITS
Original file line number Diff line number Diff line change
@@ -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.

2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License

Copyright (c) 2010 [email protected]
Copyright (c) 2010-2011 [email protected]

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
29 changes: 12 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -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 [email protected]: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 changes: 11 additions & 0 deletions Resources/views/CRUD/list_many_to_many.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{#
This file is part of the Sonata package.
(c) Thomas Rabaix <[email protected]>
For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
#}

11 changes: 11 additions & 0 deletions Resources/views/CRUD/list_one_to_many.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{#
This file is part of the Sonata package.
(c) Thomas Rabaix <[email protected]>
For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
#}

0 comments on commit e0e3e92

Please sign in to comment.