mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
fix-admin and crudify user admin
This commit is contained in:
parent
f93c2d8d32
commit
b5c2dd7bd2
@ -23,20 +23,17 @@ namespace Chill\MainBundle\Controller;
|
|||||||
|
|
||||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||||
|
|
||||||
/**
|
use Symfony\Component\Routing\Annotation\Route;
|
||||||
* Class AdminController
|
|
||||||
*
|
|
||||||
* @package Chill\MainBundle\Controller
|
|
||||||
* @author julien.fastre@champs-libres.coop
|
|
||||||
* @author marc@champs-libres.coop
|
|
||||||
*/
|
|
||||||
class AdminController extends AbstractController
|
class AdminController extends AbstractController
|
||||||
{
|
{
|
||||||
|
|
||||||
public function indexAction($menu = 'admin',
|
/**
|
||||||
$header_title = 'views.Main.admin.index.header_title',
|
* @Route("/{_locale}/admin", name="chill_main_admin_central")
|
||||||
$page_title = 'views.Main.admin.index.page_title') {
|
*/
|
||||||
return $this->render('@ChillMain/Admin/layout.html.twig');
|
public function indexAction()
|
||||||
|
{
|
||||||
|
return $this->render('@ChillMain/Admin/index.html.twig');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function indexPermissionsAction()
|
public function indexPermissionsAction()
|
||||||
@ -44,11 +41,4 @@ class AdminController extends AbstractController
|
|||||||
return $this->render('@ChillMain/Admin/layout_permissions.html.twig');
|
return $this->render('@ChillMain/Admin/layout_permissions.html.twig');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function configurationWarningsAction()
|
|
||||||
{
|
|
||||||
$alertManager = $this->get('chill_main.configuration_alert_manager');
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
namespace Chill\MainBundle\Controller;
|
namespace Chill\MainBundle\Controller;
|
||||||
|
|
||||||
|
use Chill\MainBundle\CRUD\Controller\AbstractCRUDController;
|
||||||
|
use Chill\MainBundle\CRUD\Controller\CRUDController;
|
||||||
use Psr\Log\LoggerInterface;
|
use Psr\Log\LoggerInterface;
|
||||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||||
use Symfony\Component\HttpFoundation\Request;
|
use Symfony\Component\HttpFoundation\Request;
|
||||||
@ -11,6 +13,9 @@ use Chill\MainBundle\Form\UserType;
|
|||||||
use Chill\MainBundle\Entity\GroupCenter;
|
use Chill\MainBundle\Entity\GroupCenter;
|
||||||
use Chill\MainBundle\Form\Type\ComposedGroupCenterType;
|
use Chill\MainBundle\Form\Type\ComposedGroupCenterType;
|
||||||
use Chill\MainBundle\Form\UserPasswordType;
|
use Chill\MainBundle\Form\UserPasswordType;
|
||||||
|
use Symfony\Component\HttpFoundation\Response;
|
||||||
|
use Symfony\Component\Security\Core\Encoder\PasswordEncoderInterface;
|
||||||
|
use Symfony\Component\Security\Core\Encoder\UserPasswordEncoderInterface;
|
||||||
use Symfony\Component\Validator\Validator\ValidatorInterface;
|
use Symfony\Component\Validator\Validator\ValidatorInterface;
|
||||||
|
|
||||||
|
|
||||||
@ -19,7 +24,7 @@ use Symfony\Component\Validator\Validator\ValidatorInterface;
|
|||||||
*
|
*
|
||||||
* @package Chill\MainBundle\Controller
|
* @package Chill\MainBundle\Controller
|
||||||
*/
|
*/
|
||||||
class UserController extends AbstractController
|
class UserController extends CRUDController
|
||||||
{
|
{
|
||||||
|
|
||||||
const FORM_GROUP_CENTER_COMPOSED = 'composed_groupcenter';
|
const FORM_GROUP_CENTER_COMPOSED = 'composed_groupcenter';
|
||||||
@ -34,54 +39,46 @@ class UserController extends AbstractController
|
|||||||
*/
|
*/
|
||||||
private $validator;
|
private $validator;
|
||||||
|
|
||||||
|
private UserPasswordEncoderInterface $passwordEncoder;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* UserController constructor.
|
* UserController constructor.
|
||||||
*
|
*
|
||||||
* @param LoggerInterface $logger
|
* @param LoggerInterface $logger
|
||||||
* @param ValidatorInterface $validator
|
* @param ValidatorInterface $validator
|
||||||
*/
|
*/
|
||||||
public function __construct(LoggerInterface $logger, ValidatorInterface $validator)
|
public function __construct(
|
||||||
{
|
LoggerInterface $logger,
|
||||||
|
ValidatorInterface $validator,
|
||||||
|
UserPasswordEncoderInterface $passwordEncoder
|
||||||
|
) {
|
||||||
$this->logger = $logger;
|
$this->logger = $logger;
|
||||||
$this->validator = $validator;
|
$this->validator = $validator;
|
||||||
|
$this->passwordEncoder = $passwordEncoder;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Lists all User entities.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public function indexAction()
|
|
||||||
{
|
|
||||||
$em = $this->getDoctrine()->getManager();
|
|
||||||
|
|
||||||
$entities = $em->createQuery('SELECT u FROM ChillMainBundle:User u '
|
|
||||||
. 'ORDER BY u.username')
|
|
||||||
->getResult();
|
|
||||||
|
|
||||||
return $this->render('@ChillMain/User/index.html.twig', array(
|
|
||||||
'entities' => $entities,
|
|
||||||
));
|
|
||||||
}
|
|
||||||
/**
|
/**
|
||||||
* Creates a new User entity.
|
* Creates a new User entity.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public function createAction(Request $request)
|
public function new(Request $request): Response
|
||||||
{
|
{
|
||||||
$user = new User();
|
$user = new User();
|
||||||
$form = $this->createCreateForm($user);
|
$form = $this->createCreateForm($user);
|
||||||
$form->handleRequest($request);
|
$form->handleRequest($request);
|
||||||
|
|
||||||
if ($form->isValid()) {
|
if ($form->isSubmitted() && $form->isValid()) {
|
||||||
$em = $this->getDoctrine()->getManager();
|
$em = $this->getDoctrine()->getManager();
|
||||||
|
|
||||||
$user->setPassword($this->get('security.password_encoder')
|
$user->setPassword($this->passwordEncoder
|
||||||
->encodePassword($user, $form['plainPassword']->getData()));
|
->encodePassword($user, $form['plainPassword']->getData()));
|
||||||
|
|
||||||
$em->persist($user);
|
$em->persist($user);
|
||||||
$em->flush();
|
$em->flush();
|
||||||
|
|
||||||
return $this->redirect($this->generateUrl('admin_user_show', array('id' => $user->getId())));
|
return $this->redirect($this->generateUrl('admin_user_show', array('id' => $user->getId())));
|
||||||
|
} elseif ($form->isSubmitted() && !$form->isValid()){
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->render('@ChillMain/User/new.html.twig', array(
|
return $this->render('@ChillMain/User/new.html.twig', array(
|
||||||
@ -110,21 +107,6 @@ class UserController extends AbstractController
|
|||||||
return $form;
|
return $form;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Displays a form to create a new User entity.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public function newAction()
|
|
||||||
{
|
|
||||||
$user = new User();
|
|
||||||
$form = $this->createCreateForm($user);
|
|
||||||
|
|
||||||
return $this->render('@ChillMain/User/new.html.twig', array(
|
|
||||||
'entity' => $user,
|
|
||||||
'form' => $form->createView(),
|
|
||||||
));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Finds and displays a User entity.
|
* Finds and displays a User entity.
|
||||||
*
|
*
|
||||||
|
@ -19,10 +19,13 @@
|
|||||||
|
|
||||||
namespace Chill\MainBundle\DependencyInjection;
|
namespace Chill\MainBundle\DependencyInjection;
|
||||||
|
|
||||||
|
use Chill\MainBundle\Controller\UserController;
|
||||||
use Chill\MainBundle\Doctrine\DQL\STContains;
|
use Chill\MainBundle\Doctrine\DQL\STContains;
|
||||||
use Chill\MainBundle\Doctrine\DQL\StrictWordSimilarityOPS;
|
use Chill\MainBundle\Doctrine\DQL\StrictWordSimilarityOPS;
|
||||||
|
use Chill\MainBundle\Entity\User;
|
||||||
use Chill\MainBundle\Entity\UserJob;
|
use Chill\MainBundle\Entity\UserJob;
|
||||||
use Chill\MainBundle\Form\UserJobType;
|
use Chill\MainBundle\Form\UserJobType;
|
||||||
|
use Chill\MainBundle\Form\UserType;
|
||||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||||
use Symfony\Component\Config\FileLocator;
|
use Symfony\Component\Config\FileLocator;
|
||||||
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
|
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
|
||||||
@ -290,6 +293,26 @@ class ChillMainExtension extends Extension implements PrependExtensionInterface,
|
|||||||
]
|
]
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
[
|
||||||
|
'class' => User::class,
|
||||||
|
'controller' => UserController::class,
|
||||||
|
'name' => 'admin_user',
|
||||||
|
'base_path' => '/admin/main/user2',
|
||||||
|
'base_role' => 'ROLE_ADMIN',
|
||||||
|
'form_class' => UserType::class,
|
||||||
|
'actions' => [
|
||||||
|
'index' => [
|
||||||
|
'role' => 'ROLE_ADMIN',
|
||||||
|
'template' => '@ChillMain/User/index.html.twig'
|
||||||
|
],
|
||||||
|
'new' => [
|
||||||
|
'role' => 'ROLE_ADMIN',
|
||||||
|
],
|
||||||
|
'edit' => [
|
||||||
|
'role' => 'ROLE_ADMIN',
|
||||||
|
]
|
||||||
|
]
|
||||||
|
]
|
||||||
],
|
],
|
||||||
'apis' => [
|
'apis' => [
|
||||||
[
|
[
|
||||||
|
@ -0,0 +1,8 @@
|
|||||||
|
{% extends '@ChillMain/Admin/layout_permissions.html.twig' %}
|
||||||
|
|
||||||
|
{% block title %}{{ ('crud.' ~ crud_name ~ '.index.title')|trans({'%crud_name%': crud_name}) }}{% endblock %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
{% embed '@ChillMain/CRUD/_index.html.twig' %}
|
||||||
|
{% endembed %}
|
||||||
|
{% endblock content %}
|
@ -1,17 +1,15 @@
|
|||||||
{% extends "@ChillMain/Admin/layoutWithVerticalMenu.html.twig" %}
|
{% extends "@ChillMain/Admin/layoutWithVerticalMenu.html.twig" %}
|
||||||
|
|
||||||
|
{% block vertical_menu_content %}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
{% block admin_content %}
|
{% block admin_content %}
|
||||||
<h1>{{ 'Administration interface'|trans }}</h1>
|
<h1>{{ 'Administration interface'|trans }}</h1>
|
||||||
|
|
||||||
{{ 'welcome_message_raw'|trans|raw }}
|
<p>{{ 'Welcome to the admin section !'|trans }}</p>
|
||||||
|
|
||||||
<div>
|
{{ chill_menu('admin_index', {
|
||||||
<h2>{{ 'Configuration alerts'|trans }}</h2>
|
'layout': '@ChillMain/Admin/menu_admin_index.html.twig'
|
||||||
|
}) }}
|
||||||
<p>{{ 'Here you can check the configuration of your instance.'|trans }}</p>
|
|
||||||
|
|
||||||
{{ chill_widget('configuration_warnings', {}) }}
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
@ -1,37 +1,14 @@
|
|||||||
{#
|
|
||||||
* Copyright (C) 2014-2015, Champs Libres Cooperative SCRLFS,
|
|
||||||
<info@champs-libres.coop> / <http://www.champs-libres.coop>
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as
|
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
|
||||||
* License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
#}
|
|
||||||
|
|
||||||
{#
|
|
||||||
The layout of the admin section. All the page / template of the admin section must use this
|
|
||||||
layout.
|
|
||||||
#}
|
|
||||||
|
|
||||||
{% extends "@ChillMain/layoutWithVerticalMenu.html.twig" %}
|
{% extends "@ChillMain/layoutWithVerticalMenu.html.twig" %}
|
||||||
|
|
||||||
{% block navigation_search_bar %}{% endblock %}
|
{% block navigation_search_bar %}{% endblock %}
|
||||||
{% block navigation_section_menu %}
|
{% block navigation_section_menu %}
|
||||||
{{ chill_menu('admin_section', {
|
{{ chill_menu('admin_section', {
|
||||||
'layout': '@ChillMain/Menu/adminSection.html.twig',
|
'layout': '@ChillMain/Admin/menu_admin_section.html.twig',
|
||||||
}) }}
|
}) }}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block layout_wvm_content %}
|
{% block layout_wvm_content %}
|
||||||
{% block admin_content %}<!-- block personcontent empty -->
|
{% block admin_content %}
|
||||||
<h2>{{ 'Welcome to the admin section !'|trans }}</h2>
|
<!-- block admin content emty -->
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% endblock %}
|
{% endblock %}
|
@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
{% block vertical_menu_content %}
|
{% block vertical_menu_content %}
|
||||||
{{ chill_menu('admin_permissions', {
|
{{ chill_menu('admin_permissions', {
|
||||||
'layout': '@ChillMain/Menu/admin_permissions.html.twig',
|
'layout': '@ChillMain/Admin/menu_admin_permissions.html.twig',
|
||||||
}) }}
|
}) }}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
@ -0,0 +1,18 @@
|
|||||||
|
<div class="{{ 'menu-' ~ menus.name }}">
|
||||||
|
<ul>
|
||||||
|
{% for menu in menus %}
|
||||||
|
<li>
|
||||||
|
<a class=""
|
||||||
|
href="{{ menu.uri }}">
|
||||||
|
<h3>{{ menu.label|trans }}</h3>
|
||||||
|
|
||||||
|
{% if menu.extras.explain is defined %}
|
||||||
|
<div class="" >
|
||||||
|
{{ menu.extras.explain|trans }}
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
{% endfor %}
|
||||||
|
</ul>
|
||||||
|
</div>
|
@ -25,13 +25,9 @@
|
|||||||
<li class="title">
|
<li class="title">
|
||||||
{% block v_menu_title %}<!-- title of the verticalMenu is empty -->{% endblock %}
|
{% block v_menu_title %}<!-- title of the verticalMenu is empty -->{% endblock %}
|
||||||
</li>
|
</li>
|
||||||
{% for route in routes %}
|
{% for menu in menus %}
|
||||||
<li class="{% apply spaceless %}
|
<li class="{% if menu is knp_menu_current %}current {% endif %}">
|
||||||
{% if route.key == activeRouteKey %}
|
<a href="{{ menu.uri }}" >{{ menu.label|trans }}</a>
|
||||||
active
|
|
||||||
{% endif %}
|
|
||||||
{% endapply %} ">
|
|
||||||
<a href="{{ path(route.key, args ) }}" >{{ route.label|trans }}</a>
|
|
||||||
</li>
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
@ -1,9 +1,66 @@
|
|||||||
{% extends '@ChillMain/Admin/layout_permissions.html.twig' %}
|
{% extends '@ChillMain/Admin/Permission/layout_crud_permission_index.html.twig' %}
|
||||||
|
|
||||||
{% block title %}{{ 'user list'|trans|capitalize }}{% endblock %}
|
|
||||||
|
|
||||||
{% block admin_content -%}
|
{% block admin_content -%}
|
||||||
<h1>{{ 'user list'|trans|capitalize }}</h1>
|
{% embed '@ChillMain/CRUD/_index.html.twig' %}
|
||||||
|
{% block table_entites_thead_tr %}
|
||||||
|
<th>{{ 'crud.admin_user.index.is_active'|trans }}</th>
|
||||||
|
<th>{{ 'crud.admin_user.index.usernames'|trans }}</th>
|
||||||
|
<th>{{ 'crud.admin_user.index.mains'|trans }}</th>
|
||||||
|
<th> </th>
|
||||||
|
{% endblock %}
|
||||||
|
{% block table_entities_tbody %}
|
||||||
|
{% for entity in entities %}
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{% if entity.isEnabled %}
|
||||||
|
<i class="fa fa-check chill-green"></i>
|
||||||
|
{% else %}
|
||||||
|
<i class="fa fa-times chill-red"></i>
|
||||||
|
{% endif %}
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
{{ entity.username }}
|
||||||
|
<br/>
|
||||||
|
{{ entity.label }}
|
||||||
|
<br/>
|
||||||
|
{{ entity.email }}
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
{% if entity.userJob %}
|
||||||
|
{{ entity.userJob.label|localize_translatable_string }}
|
||||||
|
<br/>
|
||||||
|
{% endif %}
|
||||||
|
{% if entity.mainScope %}
|
||||||
|
{{ entity.mainScope.name|localize_translatable_string }}
|
||||||
|
<br/>
|
||||||
|
{% endif %}
|
||||||
|
{% if entity.mainCenter %}
|
||||||
|
{{ entity.mainCenter.name }}
|
||||||
|
{% endif %}
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<ul class="record_actions">
|
||||||
|
<li>
|
||||||
|
<a class="btn btn-edit" href="{{ path('admin_user_edit', { 'id': entity.id }) }}"></a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a class="btn btn-edit chill-red" href="{{ path('admin_user_edit_password', { 'id' : entity.id }) }}">{{ 'Edit password'|trans }}</a>
|
||||||
|
</li>
|
||||||
|
{% if is_granted('ROLE_ALLOWED_TO_SWITCH') %}
|
||||||
|
<li>
|
||||||
|
<a class="btn chill-blue" href="{{ path('chill_main_homepage', {'_switch_user': entity.username }) }}" title="{{ "Impersonate"|trans|e('html_attr') }}"><i class="fa fa-universal-access"></i></a>
|
||||||
|
</li>
|
||||||
|
{% endif %}
|
||||||
|
</ul>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
{% endfor %}
|
||||||
|
{% endblock %}
|
||||||
|
{% endembed %}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{#
|
||||||
|
|
||||||
<table class="records_list">
|
<table class="records_list">
|
||||||
<thead>
|
<thead>
|
||||||
@ -51,3 +108,5 @@
|
|||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
{% endblock admin_content %}
|
{% endblock admin_content %}
|
||||||
|
|
||||||
|
#}
|
||||||
|
@ -51,12 +51,13 @@ class AdminSectionMenuBuilder implements LocalMenuBuilderInterface
|
|||||||
])
|
])
|
||||||
->setExtras([
|
->setExtras([
|
||||||
'icons' => ['key'],
|
'icons' => ['key'],
|
||||||
'order' => 200
|
'order' => 200,
|
||||||
|
'explain' => "Configure permissions for users"
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getMenuIds(): array
|
public static function getMenuIds(): array
|
||||||
{
|
{
|
||||||
return [ 'admin_section' ];
|
return [ 'admin_section', 'admin_index' ];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,47 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Chill\MainBundle\Routing\MenuBuilder;
|
||||||
|
|
||||||
|
use Knp\Menu\MenuItem;
|
||||||
|
|
||||||
|
class PermissionMenuBuilder implements \Chill\MainBundle\Routing\LocalMenuBuilderInterface
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @inheritDoc
|
||||||
|
*/
|
||||||
|
public static function getMenuIds(): array
|
||||||
|
{
|
||||||
|
return [ 'admin_permissions' ];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function buildMenu($menuId, MenuItem $menu, array $parameters)
|
||||||
|
{
|
||||||
|
$menu->addChild('Permissions group list', [
|
||||||
|
'route' => 'admin_permissionsgroup'
|
||||||
|
])->setExtras([
|
||||||
|
'order' => 300
|
||||||
|
]);
|
||||||
|
|
||||||
|
$menu->addChild('List users', [
|
||||||
|
'route' => 'admin_user'
|
||||||
|
])->setExtras(['order' => 400]);
|
||||||
|
|
||||||
|
$menu->addChild('List users CRUD', [
|
||||||
|
'route' => 'chill_crud_admin_user_index'
|
||||||
|
])->setExtras(['order' => 400]);
|
||||||
|
|
||||||
|
$menu->addChild('List circles', [
|
||||||
|
'route' => 'admin_scope'
|
||||||
|
])->setExtras(['order' => 200]);
|
||||||
|
|
||||||
|
$menu->addChild('Center list', [
|
||||||
|
'route' => 'admin_center'
|
||||||
|
])->setExtras(['order' => 100]);
|
||||||
|
|
||||||
|
$menu->addChild('User jobs', [
|
||||||
|
'route' => 'chill_crud_admin_user_job_index'
|
||||||
|
])->setExtras(['order' => 150]);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -57,15 +57,15 @@ chill_main_homepage:
|
|||||||
path: /{_locale}/homepage
|
path: /{_locale}/homepage
|
||||||
controller: Chill\MainBundle\Controller\DefaultController::indexAction
|
controller: Chill\MainBundle\Controller\DefaultController::indexAction
|
||||||
|
|
||||||
chill_main_admin_central:
|
# chill_main_admin_central:
|
||||||
path: /{_locale}/admin
|
# path: /{_locale}/admin
|
||||||
controller: Chill\MainBundle\Controller\AdminController::indexAction
|
# controller: Chill\MainBundle\Controller\AdminController::indexAction
|
||||||
options:
|
# options:
|
||||||
menus:
|
# menus:
|
||||||
admin_permissions:
|
# admin_permissions:
|
||||||
order: 0
|
# order: 0
|
||||||
label: Main admin menu
|
# label: Main admin menu
|
||||||
|
#
|
||||||
chill_main_admin_permissions:
|
chill_main_admin_permissions:
|
||||||
path: /{_locale}/admin/permissions
|
path: /{_locale}/admin/permissions
|
||||||
controller: Chill\MainBundle\Controller\AdminController::indexPermissionsAction
|
controller: Chill\MainBundle\Controller\AdminController::indexPermissionsAction
|
||||||
|
@ -1,11 +1,6 @@
|
|||||||
admin_center:
|
admin_center:
|
||||||
path: /
|
path: /
|
||||||
controller: Chill\MainBundle\Controller\CenterController::indexAction
|
controller: Chill\MainBundle\Controller\CenterController::indexAction
|
||||||
options:
|
|
||||||
menus:
|
|
||||||
admin_permissions:
|
|
||||||
order: 100
|
|
||||||
label: Center list
|
|
||||||
|
|
||||||
admin_center_show:
|
admin_center_show:
|
||||||
path: /{id}/show
|
path: /{id}/show
|
||||||
@ -14,11 +9,6 @@ admin_center_show:
|
|||||||
admin_center_new:
|
admin_center_new:
|
||||||
path: /new
|
path: /new
|
||||||
controller: Chill\MainBundle\Controller\CenterController::newAction
|
controller: Chill\MainBundle\Controller\CenterController::newAction
|
||||||
options:
|
|
||||||
menus:
|
|
||||||
admin_permissions:
|
|
||||||
order: 101
|
|
||||||
label: New center
|
|
||||||
|
|
||||||
admin_center_create:
|
admin_center_create:
|
||||||
path: /create
|
path: /create
|
||||||
|
@ -1,11 +1,6 @@
|
|||||||
admin_permissionsgroup:
|
admin_permissionsgroup:
|
||||||
path: /
|
path: /
|
||||||
controller: Chill\MainBundle\Controller\PermissionsGroupController::indexAction
|
controller: Chill\MainBundle\Controller\PermissionsGroupController::indexAction
|
||||||
options:
|
|
||||||
menus:
|
|
||||||
admin_permissions:
|
|
||||||
order: 300
|
|
||||||
label: Permissions group list
|
|
||||||
|
|
||||||
admin_permissionsgroup_show:
|
admin_permissionsgroup_show:
|
||||||
path: /{id}/show
|
path: /{id}/show
|
||||||
@ -14,11 +9,6 @@ admin_permissionsgroup_show:
|
|||||||
admin_permissionsgroup_new:
|
admin_permissionsgroup_new:
|
||||||
path: /new
|
path: /new
|
||||||
controller: Chill\MainBundle\Controller\PermissionsGroupController::newAction
|
controller: Chill\MainBundle\Controller\PermissionsGroupController::newAction
|
||||||
options:
|
|
||||||
menus:
|
|
||||||
admin_permissions:
|
|
||||||
order: 301
|
|
||||||
label: New permission group
|
|
||||||
|
|
||||||
admin_permissionsgroup_create:
|
admin_permissionsgroup_create:
|
||||||
path: /create
|
path: /create
|
||||||
|
@ -1,11 +1,6 @@
|
|||||||
admin_scope:
|
admin_scope:
|
||||||
path: /
|
path: /
|
||||||
controller: Chill\MainBundle\Controller\ScopeController::indexAction
|
controller: Chill\MainBundle\Controller\ScopeController::indexAction
|
||||||
options:
|
|
||||||
menus:
|
|
||||||
admin_permissions:
|
|
||||||
order: 200
|
|
||||||
label: List circles
|
|
||||||
|
|
||||||
admin_scope_show:
|
admin_scope_show:
|
||||||
path: /{id}/show
|
path: /{id}/show
|
||||||
@ -14,11 +9,6 @@ admin_scope_show:
|
|||||||
admin_scope_new:
|
admin_scope_new:
|
||||||
path: /new
|
path: /new
|
||||||
controller: Chill\MainBundle\Controller\ScopeController::newAction
|
controller: Chill\MainBundle\Controller\ScopeController::newAction
|
||||||
options:
|
|
||||||
menus:
|
|
||||||
admin_permissions:
|
|
||||||
order: 201
|
|
||||||
label: New circle
|
|
||||||
|
|
||||||
admin_scope_create:
|
admin_scope_create:
|
||||||
path: /create
|
path: /create
|
||||||
|
@ -1,11 +1,6 @@
|
|||||||
admin_user:
|
admin_user:
|
||||||
path: /
|
path: /
|
||||||
controller: Chill\MainBundle\Controller\UserController::indexAction
|
controller: Chill\MainBundle\Controller\UserController::indexAction
|
||||||
options:
|
|
||||||
menus:
|
|
||||||
admin_permissions:
|
|
||||||
order: 400
|
|
||||||
label: List users
|
|
||||||
|
|
||||||
admin_user_show:
|
admin_user_show:
|
||||||
path: /{id}/show
|
path: /{id}/show
|
||||||
@ -14,11 +9,6 @@ admin_user_show:
|
|||||||
admin_user_new:
|
admin_user_new:
|
||||||
path: /new
|
path: /new
|
||||||
controller: Chill\MainBundle\Controller\UserController::newAction
|
controller: Chill\MainBundle\Controller\UserController::newAction
|
||||||
options:
|
|
||||||
menus:
|
|
||||||
admin_permissions:
|
|
||||||
order: 401
|
|
||||||
label: Add a new user
|
|
||||||
|
|
||||||
admin_user_create:
|
admin_user_create:
|
||||||
path: /create
|
path: /create
|
||||||
|
@ -29,10 +29,8 @@ services:
|
|||||||
tags: ['controller.service_arguments']
|
tags: ['controller.service_arguments']
|
||||||
|
|
||||||
Chill\MainBundle\Controller\UserController:
|
Chill\MainBundle\Controller\UserController:
|
||||||
arguments:
|
autowire: true
|
||||||
$logger: '@Psr\Log\LoggerInterface'
|
autoconfigure: true
|
||||||
$validator: '@Symfony\Component\Validator\Validator\ValidatorInterface'
|
|
||||||
tags: ['controller.service_arguments']
|
|
||||||
|
|
||||||
Chill\MainBundle\Controller\NotificationController:
|
Chill\MainBundle\Controller\NotificationController:
|
||||||
arguments:
|
arguments:
|
||||||
|
@ -1,4 +1,9 @@
|
|||||||
services:
|
services:
|
||||||
|
Chill\MainBundle\Routing\MenuBuilder\:
|
||||||
|
resource: '../../Routing/MenuBuilder'
|
||||||
|
autowire: true
|
||||||
|
autoconfigure: true
|
||||||
|
|
||||||
Chill\MainBundle\Routing\MenuBuilder\UserMenuBuilder:
|
Chill\MainBundle\Routing\MenuBuilder\UserMenuBuilder:
|
||||||
arguments:
|
arguments:
|
||||||
$tokenStorage: '@Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface'
|
$tokenStorage: '@Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user