+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
namespace Chill\PersonBundle\Repository\SocialWork;
diff --git a/src/Bundle/ChillPersonBundle/Resources/views/SocialWork/Evaluation/index.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/SocialWork/Evaluation/index.html.twig
new file mode 100644
index 000000000..186b2f3ec
--- /dev/null
+++ b/src/Bundle/ChillPersonBundle/Resources/views/SocialWork/Evaluation/index.html.twig
@@ -0,0 +1,27 @@
+{% extends '@ChillPerson/Admin/layout.html.twig' %}
+
+{% block layout_wvm_content %}
+ {% embed '@ChillMain/CRUD/_index.html.twig' %}
+ {% block table_entities_thead_tr %}
+ {{ 'Id'|trans }} |
+ {{ 'Title'|trans }} |
+ |
+ {% endblock %}
+
+ {% block table_entities_tbody %}
+ {% for entity in entities %}
+
+ {{ entity.id }} |
+ {{ entity.title|localize_translatable_string }} |
+
+
+ |
+
+ {% endfor %}
+ {% 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
new file mode 100644
index 000000000..aa7c239ba
--- /dev/null
+++ b/src/Bundle/ChillPersonBundle/Resources/views/SocialWork/Goal/index.html.twig
@@ -0,0 +1,27 @@
+{% extends '@ChillPerson/Admin/layout.html.twig' %}
+
+{% block layout_wvm_content %}
+ {% embed '@ChillMain/CRUD/_index.html.twig' %}
+ {% block table_entities_thead_tr %}
+ {{ 'Id'|trans }} |
+ {{ 'Title'|trans }} |
+ |
+ {% endblock %}
+
+ {% block table_entities_tbody %}
+ {% for entity in entities %}
+
+ {{ entity.id }} |
+ {{ entity.title|localize_translatable_string }} |
+
+
+ |
+
+ {% endfor %}
+ {% 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
new file mode 100644
index 000000000..f1081aebe
--- /dev/null
+++ b/src/Bundle/ChillPersonBundle/Resources/views/SocialWork/Result/index.html.twig
@@ -0,0 +1,27 @@
+{% extends '@ChillPerson/Admin/layout.html.twig' %}
+
+{% block layout_wvm_content %}
+ {% embed '@ChillMain/CRUD/_index.html.twig' %}
+ {% block table_entities_thead_tr %}
+ {{ 'Id'|trans }} |
+ {{ 'Title'|trans }} |
+ |
+ {% endblock %}
+
+ {% block table_entities_tbody %}
+ {% for entity in entities %}
+
+ {{ entity.id }} |
+ {{ entity.title|localize_translatable_string }} |
+
+
+ |
+
+ {% endfor %}
+ {% 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
new file mode 100644
index 000000000..4c1d5a59d
--- /dev/null
+++ b/src/Bundle/ChillPersonBundle/Resources/views/SocialWork/SocialAction/index.html.twig
@@ -0,0 +1,27 @@
+{% extends '@ChillPerson/Admin/layout.html.twig' %}
+
+{% block layout_wvm_content %}
+ {% embed '@ChillMain/CRUD/_index.html.twig' %}
+ {% block table_entities_thead_tr %}
+ {{ 'Id'|trans }} |
+ {{ 'Title'|trans }} |
+ |
+ {% endblock %}
+
+ {% block table_entities_tbody %}
+ {% for entity in entities %}
+
+ {{ entity.id }} |
+ {{ entity.title|localize_translatable_string }} |
+
+
+ |
+
+ {% endfor %}
+ {% 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
new file mode 100644
index 000000000..44627852e
--- /dev/null
+++ b/src/Bundle/ChillPersonBundle/Resources/views/SocialWork/SocialIssue/index.html.twig
@@ -0,0 +1,27 @@
+{% extends '@ChillPerson/Admin/layout.html.twig' %}
+
+{% block layout_wvm_content %}
+ {% embed '@ChillMain/CRUD/_index.html.twig' %}
+ {% block table_entities_thead_tr %}
+ {{ 'Id'|trans }} |
+ {{ 'Title'|trans }} |
+ |
+ {% endblock %}
+
+ {% block table_entities_tbody %}
+ {% for entity in entities %}
+
+ {{ entity.id }} |
+ {{ entity.title|localize_translatable_string }} |
+
+
+ |
+
+ {% endfor %}
+ {% 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
new file mode 100644
index 000000000..0ae8754fe
--- /dev/null
+++ b/src/Bundle/ChillPersonBundle/Resources/views/SocialWork/edit.html.twig
@@ -0,0 +1,12 @@
+{% extends '@ChillPerson/Admin/layout.html.twig' %}
+
+{% block title %}
+{% 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 %}
diff --git a/src/Bundle/ChillPersonBundle/Resources/views/SocialWork/new.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/SocialWork/new.html.twig
new file mode 100644
index 000000000..cc6021021
--- /dev/null
+++ b/src/Bundle/ChillPersonBundle/Resources/views/SocialWork/new.html.twig
@@ -0,0 +1,11 @@
+{% extends '@ChillPerson/Admin/layout.html.twig' %}
+
+{% block title %}
+{% 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 %}
diff --git a/src/Bundle/ChillPersonBundle/config/routes.yaml b/src/Bundle/ChillPersonBundle/config/routes.yaml
index cd0de3ea3..bbcb7c39b 100644
--- a/src/Bundle/ChillPersonBundle/config/routes.yaml
+++ b/src/Bundle/ChillPersonBundle/config/routes.yaml
@@ -136,6 +136,54 @@ chill_person_maritalstatus_admin:
order: 120
label: 'person_admin.marital status'
+chill_person_socialissue_admin:
+ path: /{_locale}/admin/social-work/social-issue
+ controller: cscrud_social_issue_controller:index
+ options:
+ menus:
+ admin_person:
+ order: 150
+ label: 'person_admin.social_issue'
+
+chill_person_socialaction_admin:
+ path: /{_locale}/admin/social-work/social-action
+ controller: cscrud_social_action_controller:index
+ options:
+ menus:
+ admin_person:
+ order: 160
+ label: 'person_admin.social_action'
+
+
+chill_person_social_evaluation_admin:
+ path: /{_locale}/admin/social-work/evaluation
+ controller: cscrud_social_evaluation_controller:index
+ options:
+ menus:
+ admin_person:
+ order: 170
+ label: 'person_admin.social_evaluation'
+
+chill_person_social_goal_admin:
+ path: /{_locale}/admin/social-work/goal
+ controller: cscrud_social_goal_controller:index
+ options:
+ menus:
+ admin_person:
+ order: 180
+ label: 'person_admin.social_goal'
+
+chill_person_social_result_admin:
+ path: /{_locale}/admin/social-work/result
+ controller: cscrud_social_result_controller:index
+ options:
+ menus:
+ admin_person:
+ order: 190
+ label: 'person_admin.social_result'
+
+
+
chill_person_controllers:
resource: "@ChillPersonBundle/Controller"
type: annotation
diff --git a/src/Bundle/ChillPersonBundle/config/services/form.yaml b/src/Bundle/ChillPersonBundle/config/services/form.yaml
index aa6f36b28..b61de615d 100644
--- a/src/Bundle/ChillPersonBundle/config/services/form.yaml
+++ b/src/Bundle/ChillPersonBundle/config/services/form.yaml
@@ -32,7 +32,7 @@ services:
chill.person.form.type.pick_person:
class: Chill\PersonBundle\Form\Type\PickPersonType
arguments:
- - "@chill.person.repository.person"
+ - '@Chill\PersonBundle\Repository\PersonRepository'
- "@security.token_storage"
- "@chill.main.security.authorization.helper"
- '@Symfony\Component\Routing\Generator\UrlGeneratorInterface'
@@ -53,3 +53,35 @@ services:
$em: '@Doctrine\ORM\EntityManagerInterface'
tags:
- { name: form.type }
+
+ Chill\PersonBundle\Form\SocialWork\SocialIssueType:
+ arguments:
+ $translatableStringHelper: '@chill.main.helper.translatable_string'
+ tags:
+ - { name: form.type }
+
+ Chill\PersonBundle\Form\SocialWork\SocialActionType:
+ arguments:
+ $translatableStringHelper: '@chill.main.helper.translatable_string'
+ tags:
+ - { name: form.type }
+
+ Chill\PersonBundle\Form\SocialWork\EvaluationType:
+ arguments:
+ $translatableStringHelper: '@chill.main.helper.translatable_string'
+ tags:
+ - { name: form.type }
+
+
+ Chill\PersonBundle\Form\SocialWork\GoalType:
+ arguments:
+ $translatableStringHelper: '@chill.main.helper.translatable_string'
+ tags:
+ - { name: form.type }
+
+
+ Chill\PersonBundle\Form\SocialWork\ResultType:
+ arguments:
+ $translatableStringHelper: '@chill.main.helper.translatable_string'
+ tags:
+ - { name: form.type }
diff --git a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml
index 52254295b..98523a762 100644
--- a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml
+++ b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml
@@ -304,6 +304,31 @@ crud:
add_new: Ajouter un nouveau
title_new: Nouvel état civil
title_edit: Modifier l'état civil
+ social_issue:
+ index:
+ title: Liste des problématiques sociales
+ add_new: Ajouter une nouvelle problématique sociale
+ title_new: Nouvelle problématique sociale
+ title_edit: Modifier la problématique sociale
+ 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
+ social_goal:
+ index:
+ title: Liste des objectifs d'action d'accompagnements
+ add_new: Ajouter un nouvel objectif d'action d'accompagnements
+ 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
+ title_new: Nouveau résultat
+ title_edit: Modifier le résultat
+
# specific to closing motive
closing_motive:
@@ -322,6 +347,11 @@ person_admin:
marital status list: Liste des états civils
marital status explanation: >
Configurer la liste des états civils.
+ social_issue: Problématiques sociales
+ social_action: Actions d'accompagnement
+ social_goal: Buts
+ social_result: Résultats
+ social_evaluation: Évaluations
# specific to accompanying period
accompanying_period: