diff --git a/src/Bundle/ChillMainBundle/DependencyInjection/ChillMainExtension.php b/src/Bundle/ChillMainBundle/DependencyInjection/ChillMainExtension.php
index 02c8589c8..6a5ea7f5f 100644
--- a/src/Bundle/ChillMainBundle/DependencyInjection/ChillMainExtension.php
+++ b/src/Bundle/ChillMainBundle/DependencyInjection/ChillMainExtension.php
@@ -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',
diff --git a/src/Bundle/ChillMainBundle/Resources/views/Admin/Country/index.html.twig b/src/Bundle/ChillMainBundle/Resources/views/Admin/Country/index.html.twig
index 6e1279701..67aa70fd1 100644
--- a/src/Bundle/ChillMainBundle/Resources/views/Admin/Country/index.html.twig
+++ b/src/Bundle/ChillMainBundle/Resources/views/Admin/Country/index.html.twig
@@ -6,6 +6,7 @@
id |
name |
countryCode |
+ |
{% endblock %}
{% block table_entities_tbody %}
{% for entity in entities %}
diff --git a/src/Bundle/ChillMainBundle/Resources/views/Admin/Country/new.html.twig b/src/Bundle/ChillMainBundle/Resources/views/Admin/Country/new.html.twig
new file mode 100644
index 000000000..643de1ff4
--- /dev/null
+++ b/src/Bundle/ChillMainBundle/Resources/views/Admin/Country/new.html.twig
@@ -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 %}
diff --git a/src/Bundle/ChillMainBundle/Resources/views/Admin/Language/new.html.twig b/src/Bundle/ChillMainBundle/Resources/views/Admin/Language/new.html.twig
new file mode 100644
index 000000000..643de1ff4
--- /dev/null
+++ b/src/Bundle/ChillMainBundle/Resources/views/Admin/Language/new.html.twig
@@ -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 %}
diff --git a/src/Bundle/ChillMainBundle/Routing/MenuBuilder/AdminSectionMenuBuilder.php b/src/Bundle/ChillMainBundle/Routing/MenuBuilder/AdminSectionMenuBuilder.php
index 9bcc80ad2..b1326a85b 100644
--- a/src/Bundle/ChillMainBundle/Routing/MenuBuilder/AdminSectionMenuBuilder.php
+++ b/src/Bundle/ChillMainBundle/Routing/MenuBuilder/AdminSectionMenuBuilder.php
@@ -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
diff --git a/src/Bundle/ChillMainBundle/Routing/MenuBuilder/LanguageCountryMenuBuilder.php b/src/Bundle/ChillMainBundle/Routing/MenuBuilder/LanguageCountryMenuBuilder.php
new file mode 100644
index 000000000..540f1344e
--- /dev/null
+++ b/src/Bundle/ChillMainBundle/Routing/MenuBuilder/LanguageCountryMenuBuilder.php
@@ -0,0 +1,33 @@
+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'];
+ }
+}
diff --git a/src/Bundle/ChillMainBundle/config/routes.yaml b/src/Bundle/ChillMainBundle/config/routes.yaml
index bebdf8f52..b0ee2c956 100644
--- a/src/Bundle/ChillMainBundle/config/routes.yaml
+++ b/src/Bundle/ChillMainBundle/config/routes.yaml
@@ -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
diff --git a/src/Bundle/ChillMainBundle/translations/messages.fr.yml b/src/Bundle/ChillMainBundle/translations/messages.fr.yml
index 0d164075b..8c1d981b9 100644
--- a/src/Bundle/ChillMainBundle/translations/messages.fr.yml
+++ b/src/Bundle/ChillMainBundle/translations/messages.fr.yml
@@ -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