From 3f256ad9075eceffa6d00a332b039b463d5a1b35 Mon Sep 17 00:00:00 2001 From: nobohan Date: Tue, 3 May 2022 19:03:58 +0200 Subject: [PATCH] admin: update marital status --- .../views/Admin/Civility/new.html.twig | 2 +- .../AdminMaritalStatusController.php | 22 -------------- .../Controller/MaritalStatusController.php | 26 ++++++++++++++++ .../ChillPersonExtension.php | 6 ++-- .../views/MaritalStatus/edit.html.twig | 14 ++++----- .../views/MaritalStatus/index.html.twig | 30 +++++++++---------- .../views/MaritalStatus/new.html.twig | 12 ++++---- .../translations/messages.fr.yml | 2 +- 8 files changed, 59 insertions(+), 55 deletions(-) delete mode 100644 src/Bundle/ChillPersonBundle/Controller/AdminMaritalStatusController.php create mode 100644 src/Bundle/ChillPersonBundle/Controller/MaritalStatusController.php diff --git a/src/Bundle/ChillMainBundle/Resources/views/Admin/Civility/new.html.twig b/src/Bundle/ChillMainBundle/Resources/views/Admin/Civility/new.html.twig index 643de1ff4..b16f2eeba 100644 --- a/src/Bundle/ChillMainBundle/Resources/views/Admin/Civility/new.html.twig +++ b/src/Bundle/ChillMainBundle/Resources/views/Admin/Civility/new.html.twig @@ -1,6 +1,6 @@ {% extends '@ChillMain/CRUD/Admin/index.html.twig' %} -{% block content -%} +{% block content %} {% embed '@ChillMain/CRUD/_new_content.html.twig' %} {% block content_form_actions_save_and_show %}{% endblock %} {% endembed %} diff --git a/src/Bundle/ChillPersonBundle/Controller/AdminMaritalStatusController.php b/src/Bundle/ChillPersonBundle/Controller/AdminMaritalStatusController.php deleted file mode 100644 index d27ebe2e8..000000000 --- a/src/Bundle/ChillPersonBundle/Controller/AdminMaritalStatusController.php +++ /dev/null @@ -1,22 +0,0 @@ -addOrderBy('e.id', 'ASC'); + + return parent::orderQuery($action, $query, $request, $paginator); + } +} diff --git a/src/Bundle/ChillPersonBundle/DependencyInjection/ChillPersonExtension.php b/src/Bundle/ChillPersonBundle/DependencyInjection/ChillPersonExtension.php index 6d2bf6d18..8fc17bf2a 100644 --- a/src/Bundle/ChillPersonBundle/DependencyInjection/ChillPersonExtension.php +++ b/src/Bundle/ChillPersonBundle/DependencyInjection/ChillPersonExtension.php @@ -166,10 +166,10 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac ], [ 'class' => \Chill\PersonBundle\Entity\MaritalStatus::class, - 'name' => 'marital_status', - 'base_path' => '/admin/marital-status', + 'name' => 'person_marital-status', + 'base_path' => '/admin/person/marital-status', 'form_class' => \Chill\PersonBundle\Form\MaritalStatusType::class, - 'controller' => \Chill\PersonBundle\Controller\AdminMaritalStatusController::class, + 'controller' => \Chill\PersonBundle\Controller\MaritalStatusController::class, 'actions' => [ 'index' => [ 'role' => 'ROLE_ADMIN', diff --git a/src/Bundle/ChillPersonBundle/Resources/views/MaritalStatus/edit.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/MaritalStatus/edit.html.twig index d132847f2..e61f3f7c0 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/MaritalStatus/edit.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/MaritalStatus/edit.html.twig @@ -1,12 +1,12 @@ -{% extends '@ChillPerson/Admin/layout.html.twig' %} +{% extends '@ChillMain/CRUD/Admin/index.html.twig' %} {% block title %} -{% include('@ChillMain/CRUD/_edit_title.html.twig') %} + {% include('@ChillMain/CRUD/_edit_title.html.twig') %} {% endblock %} -{% block layout_wvm_content %} -{% embed '@ChillMain/CRUD/_edit_content.html.twig' %} - {% block content_form_actions_view %}{% endblock %} - {% block content_form_actions_save_and_show %}{% endblock %} -{% endembed %} +{% block content %} + {% embed '@ChillMain/CRUD/_edit_content.html.twig' %} + {% block content_form_actions_view %}{% endblock %} + {% block content_form_actions_save_and_show %}{% endblock %} + {% endembed %} {% endblock %} \ No newline at end of file diff --git a/src/Bundle/ChillPersonBundle/Resources/views/MaritalStatus/index.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/MaritalStatus/index.html.twig index 52c9d5307..ce8202fb2 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/MaritalStatus/index.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/MaritalStatus/index.html.twig @@ -1,6 +1,6 @@ -{% extends '@ChillPerson/Admin/layout.html.twig' %} +{% extends '@ChillMain/CRUD/Admin/index.html.twig' %} -{% block layout_wvm_content %} +{% block content %} {% embed '@ChillMain/CRUD/_index.html.twig' %} {% block table_entities_thead_tr %} {{ 'Id'|trans }} @@ -9,19 +9,19 @@ {% endblock %} {% block table_entities_tbody %} - {% for entity in entities %} - - {{ entity.id }} - {{ entity.name|localize_translatable_string }} - - - - - {% endfor %} + {% for entity in entities %} + + {{ entity.id }} + {{ entity.name|localize_translatable_string }} + + + + + {% endfor %} {% endblock %} {% endembed %} {% endblock %} \ No newline at end of file diff --git a/src/Bundle/ChillPersonBundle/Resources/views/MaritalStatus/new.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/MaritalStatus/new.html.twig index cc6021021..52a1d140b 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/MaritalStatus/new.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/MaritalStatus/new.html.twig @@ -1,11 +1,11 @@ -{% extends '@ChillPerson/Admin/layout.html.twig' %} +{% extends '@ChillMain/CRUD/Admin/index.html.twig' %} {% block title %} -{% include('@ChillMain/CRUD/_new_title.html.twig') %} + {% include('@ChillMain/CRUD/_new_title.html.twig') %} {% endblock %} -{% block layout_wvm_content %} -{% embed '@ChillMain/CRUD/_new_content.html.twig' %} - {% block content_form_actions_save_and_show %}{% endblock %} -{% endembed %} +{% block content %} + {% embed '@ChillMain/CRUD/_new_content.html.twig' %} + {% block content_form_actions_save_and_show %}{% endblock %} + {% endembed %} {% endblock %} diff --git a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml index 70441965c..175505d88 100644 --- a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml +++ b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml @@ -372,7 +372,7 @@ crud: add_new: Ajouter un nouveau title_new: Nouveau motif de clotûre title_edit: Modifier le motif de clotûre - marital_status: + person_marital-status: index: title: Liste des états civils add_new: Ajouter un nouveau