Commit 37824fac by Julien Jorry

Fix for create list admin menu

parent 187549fb
......@@ -178,7 +178,7 @@ sonata_admin:
items:
- route: adherent_create
label: Ajouter
- admin.adherent.gerer
roles: ['ROLE_SUPER_ADMIN', 'ROLE_ADMIN_ADHERENT_GERER_ALL', 'ROLE_ADMIN_ADHERENT_GERER_CREATE']
- admin.adherent.gerer
- admin.adherent.cotisations
sonata.admin.group.prestataire:
......@@ -189,6 +189,7 @@ sonata_admin:
items:
- route: prestataire_create
label: Ajouter
roles: ['ROLE_SUPER_ADMIN', 'ROLE_ADMIN_PRESTATAIRE_GERER_ALL', 'ROLE_ADMIN_PRESTATAIRE_GERER_CREATE']
- admin.prestataire.gerer
- admin.prestataire.cotisations
- admin.groupepresta.gerer
......
......@@ -8,6 +8,7 @@ parameters:
locale: 'en'
sonata.user.admin.user.controller: 'App\Controller\CRUD\CRUDController'
sonata.media.admin.media.class: 'App\Admin\MediaAdmin'
sonata.media.admin.gallery.class: 'App\Admin\GalleryAdmin'
# PARAMETRES DE L'APPLICATION DE GESTION DE MONNAIE LOCALE COMPLEMENTAIRE
app.mlc_title: 'Outil de gestion de monnaie locale complémentaire' # Nom complet (< 100 caractères)
......
<?php
namespace App\Admin;
use Sonata\AdminBundle\Object\Metadata;
use Sonata\MediaBundle\Admin\GalleryAdmin as BaseGalleryAdmin;
use Sonata\MediaBundle\Provider\MediaProviderInterface;
/**
* Administration des galleries de medias (image, document...)
*
* LOCO : Outil de gestion de Monnaie Locale Complémentaire
* @author Julien Jorry <julien.jorry@gmail.com>
*/
class GalleryAdmin extends BaseGalleryAdmin
{
// public function getDashboardActions()
// {
// return [];
// }
}
......@@ -13,9 +13,6 @@ use Sonata\MediaBundle\Provider\MediaProviderInterface;
*/
class MediaAdmin extends BaseMediaAdmin
{
/**
* {@inheritdoc}
*/
public function getObjectMetadata($object)
{
$provider = $this->pool->getProvider($object->getProviderName());
......@@ -27,4 +24,11 @@ class MediaAdmin extends BaseMediaAdmin
return new Metadata($object->getName(), $object->getDescription(), $url);
}
// public function getDashboardActions()
// {
// // $actions = parent::getDashboardActions();
// // unset($actions['list']);
// return [];
// }
}
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