Unverified Commit b6ae0aae authored by Sebastian Castro's avatar Sebastian Castro
Browse files

refactor: display home !

parent 7be1ad42
......@@ -22,7 +22,7 @@ CSRF_PROTECTION=false # active csrf protection on production servers
###< symfony/framework-bundle ###
###> doctrine/mongodb-odm-bundle ###
MONGODB_URL=mongodb://localhost:27017
MONGODB_URL=mongodb://mongo:27017
###< doctrine/mongodb-odm-bundle ###
###> vich upload ###
......
This diff is collapsed.
......@@ -32,4 +32,6 @@ return [
FOS\UserBundle\FOSUserBundle::class => ['all' => true],
Sonata\UserBundle\SonataUserBundle::class => ['all' => true],
Http\HttplugBundle\HttplugBundle::class => ['all' => true],
Symfony\Bundle\WebProfilerBundle\WebProfilerBundle::class => ['dev' => true, 'test' => true],
Symfony\Bundle\DebugBundle\DebugBundle::class => ['dev' => true, 'test' => true],
];
debug:
# Forwards VarDumper Data clones to a centralized server allowing to inspect dumps on CLI or in your browser.
# See the "server:dump" command to start a new server.
dump_destination: "tcp://%env(VAR_DUMPER_SERVER)%"
services:
EasyCorp\EasyLog\EasyLogHandler:
public: false
arguments: ['%kernel.logs_dir%/%kernel.environment%.log']
#// FIXME: How to add this configuration automatically without messing up with the monolog configuration?
#monolog:
# handlers:
# buffered:
# type: buffer
# handler: easylog
# channels: ['!event']
# level: debug
# easylog:
# type: service
# id: EasyCorp\EasyLog\EasyLogHandler
web_profiler:
toolbar: true
intercept_redirects: false
framework:
profiler: { only_exceptions: false }
web_profiler:
toolbar: false
intercept_redirects: false
framework:
profiler: { collect: false }
#index:
# path: /
# controller: App\Controller\DefaultController::index
biopen_homepage:
path: /
controller: App\Controller\CoreController::homeAction
saas:
resource: "../src/Saas/Resources/config/routing.yml"
prefix: /
biopen_api_manifest:
path: /manifest.{_format}
defaults: { _controller: App\Controller\APIController::getManifestAction, _format: json }
requirements:
methods: GET
_format: json
biopen_core:
resource: "../src/Core/Resources/config/routing.yml"
prefix: /
biopen_directory:
path: /annuaire
defaults: { _controller: DirectoryController::renderAction }
options:
expose: true
biopen_geo_directory:
resource: "../src/GeoDirectory/Resources/config/routing.yml"
prefix: /
biopen_element_add:
path: /add
defaults: { _controller: ElementFormController::addAction }
# saas:
# resource: "../src/Saas/Resources/config/routing.yml"
# prefix: /
other:
path: /{arg1}/{arg2}/{arg3}/{arg4}/{arg5}/{arg6}
defaults: { _controller: BiopenCoreBundle:Core:home, arg1: '', arg2: '', arg3: '', arg4: '', arg5: '', arg6: '' }
\ No newline at end of file
# biopen_core:
# resource: "../src/Core/Resources/config/routing.yml"
# prefix: /
# biopen_geo_directory:
# resource: "../src/GeoDirectory/Resources/config/routing.yml"
# prefix: /
# other:
# path: /{arg1}/{arg2}/{arg3}/{arg4}/{arg5}/{arg6}
# defaults: { _controller: BiopenCoreBundle:Core:home, arg1: '', arg2: '', arg3: '', arg4: '', arg5: '', arg6: '' }
\ No newline at end of file
web_profiler_wdt:
resource: '@WebProfilerBundle/Resources/config/routing/wdt.xml'
prefix: /_wdt
web_profiler_profiler:
resource: '@WebProfilerBundle/Resources/config/routing/profiler.xml'
prefix: /_profiler
......@@ -10,6 +10,7 @@ parameters:
router.request_context.host: '%env(base_url)%'
router.request_context.base_url: '%env(base_path)%'
mailer_user: "none" # To be changed
use_as_saas: '%env(use_as_saas)%'
services:
# default configuration for services in *this* file
......
......@@ -44,7 +44,7 @@ class CategoryAdmin extends AbstractAdmin
protected function configureFormFields(FormMapper $formMapper)
{
// prevent circular reference, i.e setting a child as parent
$repo = $this->getConfigurationPool()->getContainer()->get('doctrine_mongodb')->getRepository('BiopenGeoDirectoryBundle:Option');
$repo = $this->getConfigurationPool()->getContainer()->get('doctrine_mongodb')->getRepository('App\Document\Option');
$parentQuery = $repo->createQueryBuilder()
->field('id')->notIn($this->subject->getAllOptionsIds());
......
......@@ -25,7 +25,7 @@ class ConfigurationAPIAdmin extends ConfigurationAbstractAdmin
protected function configureFormFields(FormMapper $formMapper)
{
$dm = $this->getConfigurationPool()->getContainer()->get('doctrine_mongodb');
$apiProperties = $dm->getRepository('BiopenGeoDirectoryBundle:Element')->findAllCustomProperties();
$apiProperties = $dm->getRepository('App\Document\Element')->findAllCustomProperties();
$apiPropertiesChanged = [];
foreach ($apiProperties as $key => $value) {
......
......@@ -33,7 +33,7 @@ class ConfigurationAdmin extends ConfigurationAbstractAdmin
$featureFormTypeOption = ['edit' => 'inline'];
$dm = $this->getConfigurationPool()->getContainer()->get('doctrine_mongodb');
$apiProperties = $dm->getRepository('BiopenGeoDirectoryBundle:Element')->findAllCustomProperties();
$apiProperties = $dm->getRepository('App\Document\Element')->findAllCustomProperties();
$formMapper
->with('Le site', array('class' => 'col-md-6', "description" => '<div class="iframe-container"><iframe height="110" sandbox="allow-same-origin allow-scripts" src="https://video.colibris-outilslibres.org/videos/embed/fc7d3784-7bd1-4f3a-b915-ab6daefdd52d" frameborder="0" allowfullscreen></iframe></div>'))
......
......@@ -28,7 +28,7 @@ class ConfigurationInfoBarAdmin extends ConfigurationAbstractAdmin
$featureFormOption = ['delete' => false, 'required'=> false, 'label_attr'=> ['style'=> 'display:none']];
$dm = $this->getConfigurationPool()->getContainer()->get('doctrine_mongodb');
$apiProperties = $dm->getRepository('BiopenGeoDirectoryBundle:Element')->findAllCustomProperties();
$apiProperties = $dm->getRepository('App\Document\Element')->findAllCustomProperties();
$propertiesText = implode($apiProperties, ',');
$formMapper
......
......@@ -22,7 +22,7 @@ class ConfigurationMailAdmin extends ConfigurationAbstractAdmin
protected function configureFormFields(FormMapper $formMapper)
{
$repo = $this->getConfigurationPool()->getContainer()->get('doctrine_mongodb')->getRepository('BiopenCoreBundle:Configuration');
$repo = $this->getConfigurationPool()->getContainer()->get('doctrine_mongodb')->getRepository('App\Document\Configuration');
$config = $repo->findConfiguration();
$router = $this->getConfigurationPool()->getContainer()->get('router');
......
......@@ -31,8 +31,8 @@ class ConfigurationMapAdmin extends ConfigurationAbstractAdmin
$featureFormOption = ['delete' => false, 'required'=> false, 'label_attr'=> ['style'=> 'display:none']];
$featureFormTypeOption = ['edit' => 'inline'];
$container = $this->getConfigurationPool()->getContainer();
$em = $container->get('doctrine_mongodb')->getManager();
$config = $em->getRepository('BiopenCoreBundle:Configuration')->findConfiguration();
$dm = $container->get('doctrine_mongodb')->getManager();
$config = $dm->getRepository('App\Document\Configuration')->findConfiguration();
$formMapper
->tab('Paramètres de la carte')
......
......@@ -18,7 +18,7 @@ class ElementAdmin extends ElementAdminShowEdit
public function getExportFields()
{
$container = $this->getConfigurationPool()->getContainer();
$em = $container->get('doctrine_mongodb')->getManager();
$dm = $container->get('doctrine_mongodb')->getManager();
$basicFields = [
'id' => 'id',
'name' => 'name',
......@@ -30,7 +30,7 @@ class ElementAdmin extends ElementAdminShowEdit
'postalCode' => 'address.postalCode',
'addressCountry' => 'address.addressCountry'
];
$publicProperties = $em->getRepository('BiopenGeoDirectoryBundle:Element')->findAllCustomProperties($onlypublic = true);
$publicProperties = $dm->getRepository('App\Document\Element')->findAllCustomProperties($onlypublic = true);
$customFields = [];
foreach ($publicProperties as $key => $prop) {
$customFields[$prop] = 'data';
......
......@@ -68,7 +68,7 @@ class ElementAdminAbstract extends AbstractAdmin
{
parent::initialize();
$repo = $this->getConfigurationPool()->getContainer()->get('doctrine_mongodb')->getRepository('BiopenGeoDirectoryBundle:Option');
$repo = $this->getConfigurationPool()->getContainer()->get('doctrine_mongodb')->getRepository('App\Document\Option');
$this->optionList = $repo->createQueryBuilder()->hydrate(false)->getQuery()->execute()->toArray();
foreach ($this->optionList as $key => $value) {
......
......@@ -30,11 +30,11 @@ class ImportAdmin extends AbstractAdmin
protected function configureFormFields(FormMapper $formMapper)
{
$dm = $this->getConfigurationPool()->getContainer()->get('doctrine_mongodb');
$repo = $dm->getRepository('BiopenGeoDirectoryBundle:Element');
$repo = $dm->getRepository('App\Document\Element');
$formProperties = json_encode($repo->findFormProperties());
$elementProperties = json_encode($repo->findDataCustomProperties());
$taxonomy = $dm->getRepository('BiopenGeoDirectoryBundle:Taxonomy')->findTaxonomy();
$taxonomy = $dm->getRepository('App\Document\Taxonomy')->findTaxonomy();
$optionsList = $taxonomy->getTaxonomyJson();
$isDynamic = $this->getSubject()->isDynamicImport();
......@@ -148,7 +148,7 @@ Transformer un attribut
protected function configureListFields(ListMapper $listMapper)
{
$dm = $this->getConfigurationPool()->getContainer()->get('doctrine_mongodb');
$deletedElementsCount = $dm->getRepository('BiopenGeoDirectoryBundle:Element')->findDeletedElementsByImportIdCount();
$deletedElementsCount = $dm->getRepository('App\Document\Element')->findDeletedElementsByImportIdCount();
$isDynamic = $this->getClass() == "App\Document\ImportDynamic";
$listMapper
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment