admin: admin section for thirdparty

This commit is contained in:
nobohan 2022-05-09 17:14:25 +02:00
parent 1c04a873c0
commit 1a764025e1
5 changed files with 50 additions and 2 deletions

View File

@ -0,0 +1,29 @@
<?php
/**
* Chill is a software for social workers
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
declare(strict_types=1);
namespace Chill\ThirdPartyBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\Routing\Annotation\Route;
class AdminController extends AbstractController
{
/**
* ThirdParty admin
*
* @Route("/{_locale}/admin/thirdparty", name="chill_thirdparty_admin_index")
*/
public function indexAdminAction()
{
return $this->render('ChillThirdPartyBundle:Admin:index.html.twig');
}
}

View File

@ -33,7 +33,9 @@ class AdminMenuBuilder implements LocalMenuBuilderInterface
return;
}
$menu->addChild('Third party')
$menu->addChild('Third party', [
'route' => 'chill_thirdparty_admin_index',
])
->setAttribute('class', 'list-group-item-header')
->setExtras(['order' => 3000, 'header' => true]);
@ -44,6 +46,6 @@ class AdminMenuBuilder implements LocalMenuBuilderInterface
public static function getMenuIds(): array
{
return ['admin_section'];
return ['admin_section', 'admin_thirdparty'];
}
}

View File

@ -0,0 +1,13 @@
{% extends "@ChillMain/Admin/layoutWithVerticalMenu.html.twig" %}
{% block vertical_menu_content %}
{{ chill_menu('admin_thirdparty', {
'layout': '@ChillThirdParty/Admin/menu.html.twig',
}) }}
{% endblock %}
{% block layout_wvm_content %}
{% block admin_content %}<!-- block content empty -->
<h1>{{ 'Third party configuration' |trans }}</h1>
{% endblock %}
{% endblock %}

View File

@ -0,0 +1,2 @@
{% extends "@ChillMain/Menu/verticalMenu.html.twig" %}
{% block v_menu_title %}{{ 'Third party configuration'|trans }}{% endblock %}

View File

@ -80,6 +80,8 @@ Thirdparty handling: Tiers traitant
Thirdparty workers: Tiers intervenants
Third party category: Catégories de tiers
Third party configuration: Gestion des tiers
# ROLES
CHILL_3PARTY_3PARTY_CREATE: Ajouter un Tiers
CHILL_3PARTY_3PARTY_SHOW: Voir un Tiers