From 5daf09334baf75cd5b62cba171ad2132fbb12816 Mon Sep 17 00:00:00 2001 From: nobohan Date: Thu, 5 May 2022 12:07:45 +0200 Subject: [PATCH] admin: admin section for social work related entities: SocialIssue, SocialAction, Goal, Result, Evaluation --- .../SocialWork/AdminEvaluationController.php | 22 ------------ .../SocialWork/AdminGoalController.php | 22 ------------ .../SocialWork/AdminResultController.php | 22 ------------ .../AdminSocialActionController.php | 22 ------------ .../SocialWork/AdminSocialIssueController.php | 22 ------------ .../SocialWork/EvaluationController.php | 26 ++++++++++++++ .../Controller/SocialWork/GoalController.php | 26 ++++++++++++++ .../SocialWork/ResultController.php | 26 ++++++++++++++ .../SocialWork/SocialActionController.php | 26 ++++++++++++++ .../SocialWork/SocialIssueController.php | 26 ++++++++++++++ .../ChillPersonExtension.php | 10 +++--- .../Entity/SocialWork/Evaluation.php | 4 +-- .../Entity/SocialWork/Result.php | 2 +- .../Form/SocialWork/EvaluationType.php | 12 +++++-- .../Form/SocialWork/GoalType.php | 8 ++--- .../Form/SocialWork/ResultType.php | 11 +++--- .../Form/SocialWork/SocialActionType.php | 15 ++++---- .../Form/SocialWork/SocialIssueType.php | 8 ++--- .../Menu/AdminMenuBuilder.php | 30 +++++++++++++++- .../SocialWork/Evaluation/index.html.twig | 36 +++++++++++-------- .../views/SocialWork/Goal/index.html.twig | 12 +++++-- .../views/SocialWork/Result/index.html.twig | 12 +++++-- .../SocialWork/SocialAction/index.html.twig | 12 +++++-- .../SocialWork/SocialIssue/index.html.twig | 12 +++++-- .../Resources/views/SocialWork/edit.html.twig | 15 ++++---- .../Resources/views/SocialWork/new.html.twig | 16 +++++---- .../translations/messages.fr.yml | 27 +++++++++++--- 27 files changed, 290 insertions(+), 192 deletions(-) delete mode 100644 src/Bundle/ChillPersonBundle/Controller/SocialWork/AdminEvaluationController.php delete mode 100644 src/Bundle/ChillPersonBundle/Controller/SocialWork/AdminGoalController.php delete mode 100644 src/Bundle/ChillPersonBundle/Controller/SocialWork/AdminResultController.php delete mode 100644 src/Bundle/ChillPersonBundle/Controller/SocialWork/AdminSocialActionController.php delete mode 100644 src/Bundle/ChillPersonBundle/Controller/SocialWork/AdminSocialIssueController.php create mode 100644 src/Bundle/ChillPersonBundle/Controller/SocialWork/EvaluationController.php create mode 100644 src/Bundle/ChillPersonBundle/Controller/SocialWork/GoalController.php create mode 100644 src/Bundle/ChillPersonBundle/Controller/SocialWork/ResultController.php create mode 100644 src/Bundle/ChillPersonBundle/Controller/SocialWork/SocialActionController.php create mode 100644 src/Bundle/ChillPersonBundle/Controller/SocialWork/SocialIssueController.php diff --git a/src/Bundle/ChillPersonBundle/Controller/SocialWork/AdminEvaluationController.php b/src/Bundle/ChillPersonBundle/Controller/SocialWork/AdminEvaluationController.php deleted file mode 100644 index 8105066e9..000000000 --- a/src/Bundle/ChillPersonBundle/Controller/SocialWork/AdminEvaluationController.php +++ /dev/null @@ -1,22 +0,0 @@ -addOrderBy('e.id', 'ASC'); + + return parent::orderQuery($action, $query, $request, $paginator); + } +} diff --git a/src/Bundle/ChillPersonBundle/Controller/SocialWork/GoalController.php b/src/Bundle/ChillPersonBundle/Controller/SocialWork/GoalController.php new file mode 100644 index 000000000..38bd13267 --- /dev/null +++ b/src/Bundle/ChillPersonBundle/Controller/SocialWork/GoalController.php @@ -0,0 +1,26 @@ +addOrderBy('e.id', 'ASC'); + + return parent::orderQuery($action, $query, $request, $paginator); + } +} diff --git a/src/Bundle/ChillPersonBundle/Controller/SocialWork/ResultController.php b/src/Bundle/ChillPersonBundle/Controller/SocialWork/ResultController.php new file mode 100644 index 000000000..f2d9a1d4d --- /dev/null +++ b/src/Bundle/ChillPersonBundle/Controller/SocialWork/ResultController.php @@ -0,0 +1,26 @@ +addOrderBy('e.id', 'ASC'); + + return parent::orderQuery($action, $query, $request, $paginator); + } +} diff --git a/src/Bundle/ChillPersonBundle/Controller/SocialWork/SocialActionController.php b/src/Bundle/ChillPersonBundle/Controller/SocialWork/SocialActionController.php new file mode 100644 index 000000000..ccb657da7 --- /dev/null +++ b/src/Bundle/ChillPersonBundle/Controller/SocialWork/SocialActionController.php @@ -0,0 +1,26 @@ +addOrderBy('e.id', 'ASC'); + + return parent::orderQuery($action, $query, $request, $paginator); + } +} diff --git a/src/Bundle/ChillPersonBundle/Controller/SocialWork/SocialIssueController.php b/src/Bundle/ChillPersonBundle/Controller/SocialWork/SocialIssueController.php new file mode 100644 index 000000000..5531d1e4b --- /dev/null +++ b/src/Bundle/ChillPersonBundle/Controller/SocialWork/SocialIssueController.php @@ -0,0 +1,26 @@ +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 8fc17bf2a..8dad7e6ff 100644 --- a/src/Bundle/ChillPersonBundle/DependencyInjection/ChillPersonExtension.php +++ b/src/Bundle/ChillPersonBundle/DependencyInjection/ChillPersonExtension.php @@ -190,7 +190,7 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac 'name' => 'social_issue', 'base_path' => '/admin/social-work/social-issue', 'form_class' => \Chill\PersonBundle\Form\SocialWork\SocialIssueType::class, - 'controller' => \Chill\PersonBundle\Controller\SocialWork\AdminSocialIssueController::class, + 'controller' => \Chill\PersonBundle\Controller\SocialWork\SocialIssueController::class, 'actions' => [ 'index' => [ 'role' => 'ROLE_ADMIN', @@ -211,7 +211,7 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac 'name' => 'social_action', 'base_path' => '/admin/social-work/social-action', 'form_class' => \Chill\PersonBundle\Form\SocialWork\SocialActionType::class, - 'controller' => \Chill\PersonBundle\Controller\SocialWork\AdminSocialActionController::class, + 'controller' => \Chill\PersonBundle\Controller\SocialWork\SocialActionController::class, 'actions' => [ 'index' => [ 'role' => 'ROLE_ADMIN', @@ -232,7 +232,7 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac 'name' => 'social_goal', 'base_path' => '/admin/social-work/goal', 'form_class' => \Chill\PersonBundle\Form\SocialWork\GoalType::class, - 'controller' => \Chill\PersonBundle\Controller\SocialWork\AdminGoalController::class, + 'controller' => \Chill\PersonBundle\Controller\SocialWork\GoalController::class, 'actions' => [ 'index' => [ 'role' => 'ROLE_ADMIN', @@ -253,7 +253,7 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac 'name' => 'social_result', 'base_path' => '/admin/social-work/result', 'form_class' => \Chill\PersonBundle\Form\SocialWork\ResultType::class, - 'controller' => \Chill\PersonBundle\Controller\SocialWork\AdminResultController::class, + 'controller' => \Chill\PersonBundle\Controller\SocialWork\ResultController::class, 'actions' => [ 'index' => [ 'role' => 'ROLE_ADMIN', @@ -274,7 +274,7 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac 'name' => 'social_evaluation', 'base_path' => '/admin/social-work/evaluation', 'form_class' => \Chill\PersonBundle\Form\SocialWork\EvaluationType::class, - 'controller' => \Chill\PersonBundle\Controller\SocialWork\AdminEvaluationController::class, + 'controller' => \Chill\PersonBundle\Controller\SocialWork\EvaluationController::class, 'actions' => [ 'index' => [ 'role' => 'ROLE_ADMIN', diff --git a/src/Bundle/ChillPersonBundle/Entity/SocialWork/Evaluation.php b/src/Bundle/ChillPersonBundle/Entity/SocialWork/Evaluation.php index 9349c335e..e9c7496ff 100644 --- a/src/Bundle/ChillPersonBundle/Entity/SocialWork/Evaluation.php +++ b/src/Bundle/ChillPersonBundle/Entity/SocialWork/Evaluation.php @@ -121,14 +121,14 @@ class Evaluation return $this; } - public function setDelay(DateInterval $delay): self + public function setDelay(?DateInterval $delay): self { $this->delay = $delay; return $this; } - public function setNotificationDelay(DateInterval $notificationDelay): self + public function setNotificationDelay(?DateInterval $notificationDelay): self { $this->notificationDelay = $notificationDelay; diff --git a/src/Bundle/ChillPersonBundle/Entity/SocialWork/Result.php b/src/Bundle/ChillPersonBundle/Entity/SocialWork/Result.php index b4a9b6aa2..e147ec9d8 100644 --- a/src/Bundle/ChillPersonBundle/Entity/SocialWork/Result.php +++ b/src/Bundle/ChillPersonBundle/Entity/SocialWork/Result.php @@ -45,7 +45,7 @@ class Result /** * @ORM\Column(type="datetime", nullable=true) */ - private DateTime $desactivationDate; + private ?DateTime $desactivationDate; /** * @ORM\ManyToMany(targetEntity=Goal::class, mappedBy="results") diff --git a/src/Bundle/ChillPersonBundle/Form/SocialWork/EvaluationType.php b/src/Bundle/ChillPersonBundle/Form/SocialWork/EvaluationType.php index 0c6bb0d32..bbe82b59f 100644 --- a/src/Bundle/ChillPersonBundle/Form/SocialWork/EvaluationType.php +++ b/src/Bundle/ChillPersonBundle/Form/SocialWork/EvaluationType.php @@ -11,6 +11,7 @@ declare(strict_types=1); namespace Chill\PersonBundle\Form\SocialWork; +use Chill\MainBundle\Form\Type\DateIntervalType; use Chill\MainBundle\Form\Type\TranslatableStringFormType; use Chill\MainBundle\Templating\TranslatableStringHelper; use Chill\PersonBundle\Entity\SocialWork\Evaluation; @@ -39,9 +40,14 @@ class EvaluationType extends AbstractType ->add('title', TranslatableStringFormType::class, [ 'label' => 'Nom', ]) - ->add('delay') - - ->add('notificationDelay'); + ->add('delay', DateIntervalType::class, [ + 'label' => 'evaluation.delay', + 'required' => false, + ]) + ->add('notificationDelay', DateIntervalType::class, [ + 'label' => 'evaluation.notificationDelay', + 'required' => false, + ]); } public function configureOptions(OptionsResolver $resolver) diff --git a/src/Bundle/ChillPersonBundle/Form/SocialWork/GoalType.php b/src/Bundle/ChillPersonBundle/Form/SocialWork/GoalType.php index 4ea0a5e70..f1005d696 100644 --- a/src/Bundle/ChillPersonBundle/Form/SocialWork/GoalType.php +++ b/src/Bundle/ChillPersonBundle/Form/SocialWork/GoalType.php @@ -11,13 +11,13 @@ declare(strict_types=1); namespace Chill\PersonBundle\Form\SocialWork; +use Chill\MainBundle\Form\Type\ChillDateType; use Chill\MainBundle\Form\Type\TranslatableStringFormType; use Chill\MainBundle\Templating\TranslatableStringHelper; use Chill\PersonBundle\Entity\SocialWork\Goal; use Chill\PersonBundle\Entity\SocialWork\SocialAction; use Symfony\Bridge\Doctrine\Form\Type\EntityType; use Symfony\Component\Form\AbstractType; -use Symfony\Component\Form\Extension\Core\Type\DateType; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\OptionsResolver\OptionsResolver; @@ -52,11 +52,9 @@ class GoalType extends AbstractType }, ]) - ->add('desactivationDate', DateType::class, [ - 'attr' => ['class' => 'datepicker'], - 'widget' => 'single_text', - 'format' => 'dd-MM-yyyy', + ->add('desactivationDate', ChillDateType::class, [ 'required' => false, + 'label' => 'goal.desactivationDate', ]); } diff --git a/src/Bundle/ChillPersonBundle/Form/SocialWork/ResultType.php b/src/Bundle/ChillPersonBundle/Form/SocialWork/ResultType.php index a0219aaf3..b8a130950 100644 --- a/src/Bundle/ChillPersonBundle/Form/SocialWork/ResultType.php +++ b/src/Bundle/ChillPersonBundle/Form/SocialWork/ResultType.php @@ -11,11 +11,11 @@ declare(strict_types=1); namespace Chill\PersonBundle\Form\SocialWork; +use Chill\MainBundle\Form\Type\ChillDateType; use Chill\MainBundle\Form\Type\TranslatableStringFormType; use Chill\MainBundle\Templating\TranslatableStringHelper; use Chill\PersonBundle\Entity\SocialWork\Result; use Symfony\Component\Form\AbstractType; -use Symfony\Component\Form\Extension\Core\Type\DateType; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\OptionsResolver\OptionsResolver; @@ -40,13 +40,10 @@ class ResultType extends AbstractType ->add('title', TranslatableStringFormType::class, [ 'label' => 'Nom', ]) - ->add('accompanyingPeriodWorks') - ->add('accompanyingPeriodWorkGoals') - ->add('desactivationDate', DateType::class, [ - 'attr' => ['class' => 'datepicker'], - 'widget' => 'single_text', - 'format' => 'dd-MM-yyyy', + + ->add('desactivationDate', ChillDateType::class, [ 'required' => false, + 'label' => 'goal.desactivationDate', ]); } diff --git a/src/Bundle/ChillPersonBundle/Form/SocialWork/SocialActionType.php b/src/Bundle/ChillPersonBundle/Form/SocialWork/SocialActionType.php index 1f1ae0810..c476a899f 100644 --- a/src/Bundle/ChillPersonBundle/Form/SocialWork/SocialActionType.php +++ b/src/Bundle/ChillPersonBundle/Form/SocialWork/SocialActionType.php @@ -11,13 +11,14 @@ declare(strict_types=1); namespace Chill\PersonBundle\Form\SocialWork; +use Chill\MainBundle\Form\Type\ChillDateType; +use Chill\MainBundle\Form\Type\DateIntervalType; use Chill\MainBundle\Form\Type\TranslatableStringFormType; use Chill\MainBundle\Templating\TranslatableStringHelper; use Chill\PersonBundle\Entity\SocialWork\SocialAction; use Chill\PersonBundle\Entity\SocialWork\SocialIssue; use Symfony\Bridge\Doctrine\Form\Type\EntityType; use Symfony\Component\Form\AbstractType; -use Symfony\Component\Form\Extension\Core\Type\DateType; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\OptionsResolver\OptionsResolver; @@ -44,6 +45,7 @@ class SocialActionType extends AbstractType ]) ->add('issue', EntityType::class, [ 'class' => SocialIssue::class, + 'label' => 'socialAction.socialIssue', 'choice_label' => function (SocialIssue $issue) { return $this->translatableStringHelper->localize($issue->getTitle()); }, @@ -55,12 +57,13 @@ class SocialActionType extends AbstractType return $this->translatableStringHelper->localize($issue->getTitle()); }, ]) - ->add('defaultNotificationDelay') - ->add('desactivationDate', DateType::class, [ - 'attr' => ['class' => 'datepicker'], - 'widget' => 'single_text', - 'format' => 'dd-MM-yyyy', + ->add('defaultNotificationDelay', DateIntervalType::class, [ + 'label' => 'socialAction.defaultNotificationDelay', 'required' => false, + ]) + ->add('desactivationDate', ChillDateType::class, [ + 'required' => false, + 'label' => 'goal.desactivationDate', ]); } diff --git a/src/Bundle/ChillPersonBundle/Form/SocialWork/SocialIssueType.php b/src/Bundle/ChillPersonBundle/Form/SocialWork/SocialIssueType.php index 0058b1e51..5cbe4a0c2 100644 --- a/src/Bundle/ChillPersonBundle/Form/SocialWork/SocialIssueType.php +++ b/src/Bundle/ChillPersonBundle/Form/SocialWork/SocialIssueType.php @@ -11,12 +11,12 @@ declare(strict_types=1); namespace Chill\PersonBundle\Form\SocialWork; +use Chill\MainBundle\Form\Type\ChillDateType; use Chill\MainBundle\Form\Type\TranslatableStringFormType; use Chill\MainBundle\Templating\TranslatableStringHelperInterface; use Chill\PersonBundle\Entity\SocialWork\SocialIssue; use Symfony\Bridge\Doctrine\Form\Type\EntityType; use Symfony\Component\Form\AbstractType; -use Symfony\Component\Form\Extension\Core\Type\DateType; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\OptionsResolver\OptionsResolver; @@ -41,10 +41,8 @@ class SocialIssueType extends AbstractType 'required' => false, 'choice_label' => fn (SocialIssue $issue): ?string => $this->translatableStringHelper->localize($issue->getTitle()), ]) - ->add('desactivationDate', DateType::class, [ - 'attr' => ['class' => 'datepicker'], - 'widget' => 'single_text', - 'format' => 'dd-MM-yyyy', + ->add('desactivationDate', ChillDateType::class, [ + 'label' => 'goal.desactivationDate', 'required' => false, ]); } diff --git a/src/Bundle/ChillPersonBundle/Menu/AdminMenuBuilder.php b/src/Bundle/ChillPersonBundle/Menu/AdminMenuBuilder.php index 6004bb1cb..9aa1ae749 100644 --- a/src/Bundle/ChillPersonBundle/Menu/AdminMenuBuilder.php +++ b/src/Bundle/ChillPersonBundle/Menu/AdminMenuBuilder.php @@ -37,9 +37,37 @@ class AdminMenuBuilder implements LocalMenuBuilderInterface ->setAttribute('class', 'list-group-item-header') ->setExtras(['order' => 2000, 'header' => true]); + $menu->addChild('Civility', [ + 'route' => 'chill_crud_main_civility_index', + ])->setExtras(['order' => 2010]); + $menu->addChild('Marital status', [ 'route' => 'chill_crud_person_marital-status_index', - ])->setExtras(['order' => 2010]); + ])->setExtras(['order' => 2020]); + + $menu->addChild('person_admin.social_work') + ->setAttribute('class', 'list-group-item-header') + ->setExtras(['order' => 3000, 'header' => true]); + + $menu->addChild('person_admin.social_action', [ + 'route' => 'chill_crud_social_action_index', + ])->setExtras(['order' => 3001]); + + $menu->addChild('person_admin.social_issue', [ + 'route' => 'chill_crud_social_issue_index', + ])->setExtras(['order' => 3002]); + + $menu->addChild('person_admin.social_goal', [ + 'route' => 'chill_crud_social_goal_index', + ])->setExtras(['order' => 3010]); + + $menu->addChild('person_admin.social_evaluation', [ + 'route' => 'chill_crud_social_evaluation_index', + ])->setExtras(['order' => 3020]); + + $menu->addChild('person_admin.social_result', [ + 'route' => 'chill_crud_social_result_index', + ])->setExtras(['order' => 3030]); } public static function getMenuIds(): array diff --git a/src/Bundle/ChillPersonBundle/Resources/views/SocialWork/Evaluation/index.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/SocialWork/Evaluation/index.html.twig index 186b2f3ec..0adc82788 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/SocialWork/Evaluation/index.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/SocialWork/Evaluation/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 admin_content %} {% embed '@ChillMain/CRUD/_index.html.twig' %} {% block table_entities_thead_tr %} {{ 'Id'|trans }} @@ -9,19 +9,25 @@ {% endblock %} {% block table_entities_tbody %} - {% for entity in entities %} - - {{ entity.id }} - {{ entity.title|localize_translatable_string }} - - - - - {% endfor %} + {% for entity in entities %} + + {{ entity.id }} + {{ entity.title|localize_translatable_string }} + + + + + {% endfor %} + {% endblock %} + + {% block actions_before %} +
  • + {{'Back to the admin'|trans}} +
  • {% endblock %} {% endembed %} {% endblock %} diff --git a/src/Bundle/ChillPersonBundle/Resources/views/SocialWork/Goal/index.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/SocialWork/Goal/index.html.twig index aa7c239ba..3bcff2b11 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/SocialWork/Goal/index.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/SocialWork/Goal/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 admin_content %} {% embed '@ChillMain/CRUD/_index.html.twig' %} {% block table_entities_thead_tr %} {{ 'Id'|trans }} @@ -16,12 +16,18 @@ {% endfor %} {% endblock %} + + {% block actions_before %} +
  • + {{'Back to the admin'|trans}} +
  • + {% endblock %} {% endembed %} {% endblock %} diff --git a/src/Bundle/ChillPersonBundle/Resources/views/SocialWork/Result/index.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/SocialWork/Result/index.html.twig index f1081aebe..a815628ba 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/SocialWork/Result/index.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/SocialWork/Result/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 admin_content %} {% embed '@ChillMain/CRUD/_index.html.twig' %} {% block table_entities_thead_tr %} {{ 'Id'|trans }} @@ -16,12 +16,18 @@ {% endfor %} {% endblock %} + + {% block actions_before %} +
  • + {{'Back to the admin'|trans}} +
  • + {% endblock %} {% endembed %} {% endblock %} diff --git a/src/Bundle/ChillPersonBundle/Resources/views/SocialWork/SocialAction/index.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/SocialWork/SocialAction/index.html.twig index 4c1d5a59d..0497ee199 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/SocialWork/SocialAction/index.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/SocialWork/SocialAction/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 admin_content %} {% embed '@ChillMain/CRUD/_index.html.twig' %} {% block table_entities_thead_tr %} {{ 'Id'|trans }} @@ -16,12 +16,18 @@ {% endfor %} {% endblock %} + + {% block actions_before %} +
  • + {{'Back to the admin'|trans}} +
  • + {% endblock %} {% endembed %} {% endblock %} diff --git a/src/Bundle/ChillPersonBundle/Resources/views/SocialWork/SocialIssue/index.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/SocialWork/SocialIssue/index.html.twig index 44627852e..3a08ab850 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/SocialWork/SocialIssue/index.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/SocialWork/SocialIssue/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 admin_content %} {% embed '@ChillMain/CRUD/_index.html.twig' %} {% block table_entities_thead_tr %} {{ 'Id'|trans }} @@ -16,12 +16,18 @@ {% endfor %} {% endblock %} + + {% block actions_before %} +
  • + {{'Back to the admin'|trans}} +
  • + {% endblock %} {% endembed %} {% endblock %} diff --git a/src/Bundle/ChillPersonBundle/Resources/views/SocialWork/edit.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/SocialWork/edit.html.twig index 0ae8754fe..28678bf6d 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/SocialWork/edit.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/SocialWork/edit.html.twig @@ -1,12 +1,11 @@ -{% 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 %} -{% endblock %} +{% block admin_content %} + {% embed '@ChillMain/CRUD/_edit_content.html.twig' %} + {% block content_form_actions_save_and_show %}{% endblock %} + {% endembed %} +{% endblock admin_content %} \ No newline at end of file diff --git a/src/Bundle/ChillPersonBundle/Resources/views/SocialWork/new.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/SocialWork/new.html.twig index cc6021021..592ec2723 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/SocialWork/new.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/SocialWork/new.html.twig @@ -1,11 +1,13 @@ -{% 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 %} -{% endblock %} +{% block admin_content %} + {% embed '@ChillMain/CRUD/_new_content.html.twig' %} + {% block content_form_actions_save_and_show %}{% endblock %} + {% endembed %} +{% endblock admin_content %} + + diff --git a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml index 175505d88..4407671e7 100644 --- a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml +++ b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml @@ -387,23 +387,39 @@ crud: social_action: index: title: Liste des actions d'accompagnements - add_new: Ajouter une nouvelle action d'accompagnements - title_new: Nouvelle action d'accompagnements - title_edit: Modifier l'action d'accompagnements + add_new: Ajouter une nouvelle action d'accompagnement + title_new: Nouvelle action d'accompagnement + title_edit: Modifier l'action d'accompagnement title_link: Voir l'action d'accompagnement + social_evaluation: + index: + title: Liste des évaluations + add_new: Ajouter une nouvelle évaluation + title_new: Nouvelle évaluation + title_edit: Modifier l'évaluation social_goal: index: title: Liste des objectifs d'action d'accompagnements - add_new: Ajouter un nouvel objectif d'action d'accompagnements + add_new: Ajouter un nouvel objectif d'action d'accompagnement title_new: Nouvel objectif title_edit: Modifier l'objectif social_result: index: title: Liste des résultats d'action d'accompagnements - add_new: Ajouter un nouveau résultat d'action d'accompagnements + add_new: Ajouter un nouveau résultat d'action d'accompagnement title_new: Nouveau résultat title_edit: Modifier le résultat +evaluation: + delay: Délai + notificationDelay: Délai de notification + +goal: + desactivationDate: Date de désactivation + +socialAction: + defaultNotificationDelay: Délai de notification par défaut + socialIssue: Problématique sociale # specific to closing motive closing_motive: @@ -427,6 +443,7 @@ person_admin: social_goal: Buts social_result: Résultats social_evaluation: Évaluations + social_work: Accompagnement social # specific to accompanying period accompanying_period: