mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-29 21:46:14 +00:00
admin: add menu for languages and countries section
This commit is contained in:
parent
4c99abd6d3
commit
04f27cc555
@ -14,6 +14,7 @@ namespace Chill\MainBundle\DependencyInjection;
|
||||
use Chill\MainBundle\Controller\AddressApiController;
|
||||
use Chill\MainBundle\Controller\CivilityApiController;
|
||||
use Chill\MainBundle\Controller\CountryController;
|
||||
use Chill\MainBundle\Controller\LanguageController;
|
||||
use Chill\MainBundle\Controller\LocationController;
|
||||
use Chill\MainBundle\Controller\LocationTypeController;
|
||||
use Chill\MainBundle\Controller\UserController;
|
||||
@ -401,7 +402,7 @@ class ChillMainExtension extends Extension implements
|
||||
],
|
||||
'new' => [
|
||||
'role' => 'ROLE_ADMIN',
|
||||
'template' => '@ChillMain/Admin/Country/edit.html.twig',
|
||||
'template' => '@ChillMain/Admin/Country/new.html.twig',
|
||||
],
|
||||
'edit' => [
|
||||
'role' => 'ROLE_ADMIN',
|
||||
@ -423,7 +424,7 @@ class ChillMainExtension extends Extension implements
|
||||
],
|
||||
'new' => [
|
||||
'role' => 'ROLE_ADMIN',
|
||||
'template' => '@ChillMain/Admin/Language/edit.html.twig',
|
||||
'template' => '@ChillMain/Admin/Language/new.html.twig',
|
||||
],
|
||||
'edit' => [
|
||||
'role' => 'ROLE_ADMIN',
|
||||
|
@ -6,6 +6,7 @@
|
||||
<th>id</th>
|
||||
<th>name</th>
|
||||
<th>countryCode</th>
|
||||
<th></th>
|
||||
{% endblock %}
|
||||
{% block table_entities_tbody %}
|
||||
{% for entity in entities %}
|
||||
|
@ -0,0 +1,7 @@
|
||||
{% extends '@ChillMain/CRUD/Admin/index.html.twig' %}
|
||||
|
||||
{% block content -%}
|
||||
{% embed '@ChillMain/CRUD/_new_content.html.twig' %}
|
||||
{% block content_form_actions_save_and_show %}{% endblock %}
|
||||
{% endembed %}
|
||||
{% endblock content %}
|
@ -0,0 +1,7 @@
|
||||
{% extends '@ChillMain/CRUD/Admin/index.html.twig' %}
|
||||
|
||||
{% block content -%}
|
||||
{% embed '@ChillMain/CRUD/_new_content.html.twig' %}
|
||||
{% block content_form_actions_save_and_show %}{% endblock %}
|
||||
{% endembed %}
|
||||
{% endblock content %}
|
@ -51,6 +51,15 @@ class AdminSectionMenuBuilder implements LocalMenuBuilderInterface
|
||||
'order' => 205,
|
||||
'explain' => 'Configure location and location type',
|
||||
]);
|
||||
|
||||
$menu->addChild('Languages and countries', [
|
||||
'route' => 'chill_main_admin_language_country',
|
||||
])
|
||||
->setExtras([
|
||||
'icons' => ['key'],
|
||||
'order' => 210,
|
||||
'explain' => 'Configure languages and countries',
|
||||
]);
|
||||
}
|
||||
|
||||
public static function getMenuIds(): array
|
||||
|
@ -0,0 +1,33 @@
|
||||
<?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\MainBundle\Routing\MenuBuilder;
|
||||
|
||||
use Knp\Menu\MenuItem;
|
||||
|
||||
class LanguageCountryMenuBuilder implements \Chill\MainBundle\Routing\LocalMenuBuilderInterface
|
||||
{
|
||||
public function buildMenu($menuId, MenuItem $menu, array $parameters)
|
||||
{
|
||||
$menu->addChild('Language list', [
|
||||
'route' => 'chill_crud_main_language_index',
|
||||
])->setExtras(['order' => 205]);
|
||||
|
||||
$menu->addChild('Country list', [
|
||||
'route' => 'chill_crud_main_country_index',
|
||||
])->setExtras(['order' => 206]);
|
||||
}
|
||||
|
||||
public static function getMenuIds(): array
|
||||
{
|
||||
return ['admin_language_country'];
|
||||
}
|
||||
}
|
@ -70,6 +70,10 @@ chill_main_admin_locations:
|
||||
path: /{_locale}/admin/locations
|
||||
controller: Chill\MainBundle\Controller\AdminController::indexLocationsAction
|
||||
|
||||
chill_main_admin_language_country:
|
||||
path: /{_locale}/admin/language-country
|
||||
controller: Chill\MainBundle\Controller\AdminController::indexLanguageCountryAction
|
||||
|
||||
chill_main_search:
|
||||
path: /{_locale}/search.{_format}
|
||||
controller: Chill\MainBundle\Controller\SearchController::searchAction
|
||||
|
@ -226,8 +226,11 @@ thirdparty: tiers
|
||||
|
||||
#admin section for language and country
|
||||
Language and countries menu: Menu Langues & Pays
|
||||
Management of languages and countries: Gestion des langues & Pays
|
||||
|
||||
Languages and countries: Langues & Pays
|
||||
Management of languages and countries: Gestion des langues & pays
|
||||
Configure languages and countries: Configuration des langues & pays
|
||||
Language list: Liste des langues
|
||||
Country list: Liste des pays
|
||||
|
||||
# circles / scopes
|
||||
Choose the circle: Choisir le cercle
|
||||
|
Loading…
x
Reference in New Issue
Block a user