@@ -22,7 +22,6 @@
{{ document.description }}
{% endif %}
-
diff --git a/src/Bundle/ChillDocStoreBundle/Resources/views/Macro/macro.html.twig b/src/Bundle/ChillDocStoreBundle/Resources/views/Macro/macro.html.twig
index 886544b1e..0e739d94b 100644
--- a/src/Bundle/ChillDocStoreBundle/Resources/views/Macro/macro.html.twig
+++ b/src/Bundle/ChillDocStoreBundle/Resources/views/Macro/macro.html.twig
@@ -13,3 +13,19 @@
{{ 'Download'|trans }}
{% endif %}
{% endmacro %}
+
+{% macro download_button_small(storedObject, filename = null) %}
+ {% if storedObject is null %}
+
+ {% else %}
+
+ {{ 'Download'|trans }}
+ {% endif %}
+{% endmacro %}
\ No newline at end of file
diff --git a/src/Bundle/ChillDocStoreBundle/Resources/views/Macro/macro_mimeicon.html.twig b/src/Bundle/ChillDocStoreBundle/Resources/views/Macro/macro_mimeicon.html.twig
index a9bc07e2f..7079a0d94 100644
--- a/src/Bundle/ChillDocStoreBundle/Resources/views/Macro/macro_mimeicon.html.twig
+++ b/src/Bundle/ChillDocStoreBundle/Resources/views/Macro/macro_mimeicon.html.twig
@@ -48,8 +48,8 @@
{% endif %}
{% endfor %}
-
+
{{ label|capitalize }}
-
+
{% endmacro %}
\ No newline at end of file
diff --git a/src/Bundle/ChillDocStoreBundle/translations/messages.fr.yml b/src/Bundle/ChillDocStoreBundle/translations/messages.fr.yml
index 400e37236..4fbad1546 100644
--- a/src/Bundle/ChillDocStoreBundle/translations/messages.fr.yml
+++ b/src/Bundle/ChillDocStoreBundle/translations/messages.fr.yml
@@ -14,7 +14,7 @@ Edit attributes: Modifier les propriétés du document
Existing document: Document existant
No document to download: Aucun document à télécharger
'Choose a document category': Choisissez une catégorie de document
-Any document found: Aucun document trouvé
+No document found: Aucun document trouvé
The document is successfully registered: Le document est enregistré
The document is successfully updated: Le document est mis à jour
Any description: Aucune description
diff --git a/src/Bundle/ChillMainBundle/Controller/RegroupmentController.php b/src/Bundle/ChillMainBundle/Controller/RegroupmentController.php
new file mode 100644
index 000000000..c73b03027
--- /dev/null
+++ b/src/Bundle/ChillMainBundle/Controller/RegroupmentController.php
@@ -0,0 +1,26 @@
+addOrderBy('e.id', 'ASC');
+
+ return parent::orderQuery($action, $query, $request, $paginator);
+ }
+}
diff --git a/src/Bundle/ChillMainBundle/Controller/ScopeApiController.php b/src/Bundle/ChillMainBundle/Controller/ScopeApiController.php
new file mode 100644
index 000000000..85041f0f3
--- /dev/null
+++ b/src/Bundle/ChillMainBundle/Controller/ScopeApiController.php
@@ -0,0 +1,25 @@
+andWhere($query->expr()->eq('e.active', "'TRUE'"));
+ }
+ }
+}
diff --git a/src/Bundle/ChillMainBundle/Controller/UserApiController.php b/src/Bundle/ChillMainBundle/Controller/UserApiController.php
index b29fe7c8e..da873e118 100644
--- a/src/Bundle/ChillMainBundle/Controller/UserApiController.php
+++ b/src/Bundle/ChillMainBundle/Controller/UserApiController.php
@@ -12,6 +12,7 @@ declare(strict_types=1);
namespace Chill\MainBundle\Controller;
use Chill\MainBundle\CRUD\Controller\ApiController;
+use Chill\MainBundle\Pagination\PaginatorInterface;
use Doctrine\ORM\QueryBuilder;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
@@ -70,4 +71,13 @@ class UserApiController extends ApiController
$query->andWhere($query->expr()->eq('e.enabled', "'TRUE'"));
}
}
+
+ /**
+ * @param mixed $query
+ * @param mixed $_format
+ */
+ protected function orderQuery(string $action, $query, Request $request, PaginatorInterface $paginator, $_format)
+ {
+ return $query->orderBy('e.label', 'ASC');
+ }
}
diff --git a/src/Bundle/ChillMainBundle/Controller/WorkflowController.php b/src/Bundle/ChillMainBundle/Controller/WorkflowController.php
index 9be2f04fd..17b5db75e 100644
--- a/src/Bundle/ChillMainBundle/Controller/WorkflowController.php
+++ b/src/Bundle/ChillMainBundle/Controller/WorkflowController.php
@@ -85,7 +85,6 @@ class WorkflowController extends AbstractController
->setRelatedEntityClass($request->query->get('entityClass'))
->setRelatedEntityId($request->query->getInt('entityId'))
->setWorkflowName($request->query->get('workflow'))
- ->addSubscriberToStep($this->getUser())
->addSubscriberToFinal($this->getUser());
$errors = $this->validator->validate($entityWorkflow, null, ['creation']);
diff --git a/src/Bundle/ChillMainBundle/DependencyInjection/ChillMainExtension.php b/src/Bundle/ChillMainBundle/DependencyInjection/ChillMainExtension.php
index 9c2148a14..69546016a 100644
--- a/src/Bundle/ChillMainBundle/DependencyInjection/ChillMainExtension.php
+++ b/src/Bundle/ChillMainBundle/DependencyInjection/ChillMainExtension.php
@@ -18,6 +18,7 @@ use Chill\MainBundle\Controller\CountryController;
use Chill\MainBundle\Controller\LanguageController;
use Chill\MainBundle\Controller\LocationController;
use Chill\MainBundle\Controller\LocationTypeController;
+use Chill\MainBundle\Controller\RegroupmentController;
use Chill\MainBundle\Controller\UserController;
use Chill\MainBundle\Controller\UserJobApiController;
use Chill\MainBundle\Controller\UserJobController;
@@ -48,6 +49,7 @@ use Chill\MainBundle\Entity\Country;
use Chill\MainBundle\Entity\Language;
use Chill\MainBundle\Entity\Location;
use Chill\MainBundle\Entity\LocationType;
+use Chill\MainBundle\Entity\Regroupment;
use Chill\MainBundle\Entity\User;
use Chill\MainBundle\Entity\UserJob;
use Chill\MainBundle\Form\CivilityType;
@@ -55,6 +57,7 @@ use Chill\MainBundle\Form\CountryType;
use Chill\MainBundle\Form\LanguageType;
use Chill\MainBundle\Form\LocationFormType;
use Chill\MainBundle\Form\LocationTypeType;
+use Chill\MainBundle\Form\RegroupmentType;
use Chill\MainBundle\Form\UserJobType;
use Chill\MainBundle\Form\UserType;
use Exception;
@@ -499,6 +502,27 @@ class ChillMainExtension extends Extension implements
],
],
],
+ [
+ 'class' => Regroupment::class,
+ 'name' => 'regroupment',
+ 'base_path' => '/admin/regroupment',
+ 'form_class' => RegroupmentType::class,
+ 'controller' => RegroupmentController::class,
+ 'actions' => [
+ 'index' => [
+ 'role' => 'ROLE_ADMIN',
+ 'template' => '@ChillMain/Admin/Regroupment/index.html.twig',
+ ],
+ 'new' => [
+ 'role' => 'ROLE_ADMIN',
+ 'template' => '@ChillMain/Admin/Regroupment/new.html.twig',
+ ],
+ 'edit' => [
+ 'role' => 'ROLE_ADMIN',
+ 'template' => '@ChillMain/Admin/Regroupment/edit.html.twig',
+ ],
+ ],
+ ],
],
'apis' => [
[
@@ -631,6 +655,7 @@ class ChillMainExtension extends Extension implements
],
[
'class' => \Chill\MainBundle\Entity\Scope::class,
+ 'controller' => \Chill\MainBundle\Controller\ScopeApiController::class,
'name' => 'scope',
'base_path' => '/api/1.0/main/scope',
'base_role' => 'ROLE_USER',
diff --git a/src/Bundle/ChillMainBundle/Entity/Regroupment.php b/src/Bundle/ChillMainBundle/Entity/Regroupment.php
new file mode 100644
index 000000000..5faffd17c
--- /dev/null
+++ b/src/Bundle/ChillMainBundle/Entity/Regroupment.php
@@ -0,0 +1,95 @@
+centers = new ArrayCollection();
+ }
+
+ public function getCenters(): ?Collection
+ {
+ return $this->centers;
+ }
+
+ public function getId(): ?int
+ {
+ return $this->id;
+ }
+
+ public function getIsActive(): bool
+ {
+ return $this->isActive;
+ }
+
+ public function getName(): string
+ {
+ return $this->name;
+ }
+
+ public function setCenters(?Collection $centers): self
+ {
+ $this->centers = $centers;
+
+ return $this;
+ }
+
+ public function setIsActive(bool $isActive): self
+ {
+ $this->isActive = $isActive;
+
+ return $this;
+ }
+
+ public function setName(string $name): self
+ {
+ $this->name = $name;
+
+ return $this;
+ }
+}
diff --git a/src/Bundle/ChillMainBundle/Entity/User.php b/src/Bundle/ChillMainBundle/Entity/User.php
index 1317edf83..dda6b63e4 100644
--- a/src/Bundle/ChillMainBundle/Entity/User.php
+++ b/src/Bundle/ChillMainBundle/Entity/User.php
@@ -224,7 +224,7 @@ class User implements UserInterface
/**
* Get id.
*/
- public function getId(): int
+ public function getId(): ?int
{
return $this->id;
}
diff --git a/src/Bundle/ChillMainBundle/Entity/Workflow/EntityWorkflowStep.php b/src/Bundle/ChillMainBundle/Entity/Workflow/EntityWorkflowStep.php
index d86770560..4bff7a3f5 100644
--- a/src/Bundle/ChillMainBundle/Entity/Workflow/EntityWorkflowStep.php
+++ b/src/Bundle/ChillMainBundle/Entity/Workflow/EntityWorkflowStep.php
@@ -132,8 +132,6 @@ class EntityWorkflowStep
{
if (!$this->destUser->contains($user)) {
$this->destUser[] = $user;
- $this->getEntityWorkflow()
- ->addSubscriberToFinal($user);
}
return $this;
@@ -143,8 +141,6 @@ class EntityWorkflowStep
{
if (!$this->destUserByAccessKey->contains($user) && !$this->destUser->contains($user)) {
$this->destUserByAccessKey[] = $user;
- $this->getEntityWorkflow()
- ->addSubscriberToFinal($user);
}
return $this;
diff --git a/src/Bundle/ChillMainBundle/Form/RegroupmentType.php b/src/Bundle/ChillMainBundle/Form/RegroupmentType.php
new file mode 100644
index 000000000..bc8e6684f
--- /dev/null
+++ b/src/Bundle/ChillMainBundle/Form/RegroupmentType.php
@@ -0,0 +1,47 @@
+add('name', TextType::class, [
+ 'label' => 'Nom',
+ ])
+ ->add('centers', EntityType::class, [
+ 'class' => Center::class,
+ 'multiple' => true,
+ 'attr' => ['class' => 'select2'],
+ ])
+ ->add('isActive', CheckboxType::class, [
+ 'label' => 'Actif ?',
+ 'required' => false,
+ ]);
+ }
+
+ public function configureOptions(OptionsResolver $resolver)
+ {
+ $resolver
+ ->setDefault('class', Regroupment::class);
+ }
+}
diff --git a/src/Bundle/ChillMainBundle/Form/ScopeType.php b/src/Bundle/ChillMainBundle/Form/ScopeType.php
index 691328500..86335c554 100644
--- a/src/Bundle/ChillMainBundle/Form/ScopeType.php
+++ b/src/Bundle/ChillMainBundle/Form/ScopeType.php
@@ -13,6 +13,7 @@ namespace Chill\MainBundle\Form;
use Chill\MainBundle\Form\Type\TranslatableStringFormType;
use Symfony\Component\Form\AbstractType;
+use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
@@ -21,7 +22,12 @@ class ScopeType extends AbstractType
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
- ->add('name', TranslatableStringFormType::class);
+ ->add('name', TranslatableStringFormType::class)
+ ->add('active', ChoiceType::class, [
+ 'choices' => [
+ 'Active' => true,
+ 'Inactive' => false,
+ ], ]);
}
/**
diff --git a/src/Bundle/ChillMainBundle/Resources/public/chill/chillmain.scss b/src/Bundle/ChillMainBundle/Resources/public/chill/chillmain.scss
index aa1d24844..3c9fc8601 100644
--- a/src/Bundle/ChillMainBundle/Resources/public/chill/chillmain.scss
+++ b/src/Bundle/ChillMainBundle/Resources/public/chill/chillmain.scss
@@ -221,12 +221,8 @@ footer.footer {
*/
div.admin {
- flex-direction: row-reverse;
div.vertical-menu {
- font-size: 0.9em;
- .list-group-item {
- padding: 0.3rem 0.7rem;
- }
+ .list-group-item {}
}
}
@@ -307,12 +303,12 @@ table.table-bordered {
/// meta-data
div.createdBy,
div.updatedBy,
-div.metadata {
+.metadata {
span.user, span.date {
text-decoration: underline dotted;
}
}
-div.metadata {
+.metadata {
font-size: smaller;
color: $gray-600;
span.user, span.date {
@@ -368,6 +364,19 @@ div#flashMessages {
}
}
+/// unbullet lists
+ul.unbullet {
+ list-style-type: none;
+ padding-left: 0;
+}
+/// libellé
+span.dt {
+ font-size: 90%;
+ font-weight: bolder;
+ background-color: var(--bs-chill-light-gray);
+}
+
+
/*
* SPECIFIC RULES
*/
diff --git a/src/Bundle/ChillMainBundle/Resources/public/chill/scss/render_box.scss b/src/Bundle/ChillMainBundle/Resources/public/chill/scss/render_box.scss
index 4d0bfcf8e..19da5aed3 100644
--- a/src/Bundle/ChillMainBundle/Resources/public/chill/scss/render_box.scss
+++ b/src/Bundle/ChillMainBundle/Resources/public/chill/scss/render_box.scss
@@ -106,18 +106,5 @@ section.chill-entity {
// used for comment-embeddable
&.entity-comment-embeddable {
width: 100%;
-
- /* already defined !!
- div.metadata {
- font-size: smaller;
- color: $gray-600;
- span.user, span.date {
- text-decoration: underline dotted;
- &:hover {
- color: $gray-700;
- }
- }
- }
- */
}
}
diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress.vue
index 30a240938..21ab5e3d0 100644
--- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress.vue
+++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress.vue
@@ -48,33 +48,35 @@
-
+
+
+
@@ -118,40 +120,42 @@
-
+
+
+
@@ -192,32 +196,34 @@
-
-
-
-
-
-
- {{ $t('nav.previous')}}
-
-
-
-
-
- {{ $t('action.save')}}
+
+
+
+
+
+
+
+ {{ $t('nav.previous')}}
-
-
-
-
-
+
+
+
+
+ {{ $t('action.save')}}
+
+
+
+
+
+
+
diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/AddressSelection.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/AddressSelection.vue
index 2c8e17687..f1cac5254 100644
--- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/AddressSelection.vue
+++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/AddressSelection.vue
@@ -98,6 +98,11 @@ export default {
}
},
},
+ mounted() {
+ if (typeof this.value.point !== 'undefined') {
+ this.updateMapCenter(this.value.point);
+ }
+ },
methods: {
transName(value) {
return value.streetNumber === undefined ? value.street : `${value.streetNumber}, ${value.street}`
diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/EditPane.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/EditPane.vue
index 4ab117395..c0e42a7b1 100644
--- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/EditPane.vue
+++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/EditPane.vue
@@ -187,6 +187,7 @@ div.address-form {
div#address_map {
height: 400px;
width: 100%;
+ z-index: 1;
}
}
diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/ShowPane.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/ShowPane.vue
index bc246d542..5048815e2 100644
--- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/ShowPane.vue
+++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/ShowPane.vue
@@ -1,6 +1,6 @@
-
+
{{ $t('loading') }}
@@ -36,21 +36,16 @@
-
-
-
+
+
+
{{ $t(getTextButton) }}
@@ -58,10 +53,6 @@
-
-
diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/MyEvaluations.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/MyEvaluations.vue
index a872a2f43..bc043c666 100644
--- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/MyEvaluations.vue
+++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/MyEvaluations.vue
@@ -1,5 +1,5 @@
-
+
{{ $t('my_evaluations.description') }}
{{ $t('no_data') }}
diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/MyWorks.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/MyWorks.vue
index 1a8e0bb76..78f78300f 100644
--- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/MyWorks.vue
+++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/MyWorks.vue
@@ -1,6 +1,6 @@
// CURRENTLY NOT IN USE
-
+
{{ $t('my_works.description') }}
{{ $t('no_data') }}
diff --git a/src/Bundle/ChillMainBundle/Resources/views/Admin/Regroupment/edit.html.twig b/src/Bundle/ChillMainBundle/Resources/views/Admin/Regroupment/edit.html.twig
new file mode 100644
index 000000000..4d55c480c
--- /dev/null
+++ b/src/Bundle/ChillMainBundle/Resources/views/Admin/Regroupment/edit.html.twig
@@ -0,0 +1,11 @@
+{% extends '@ChillMain/CRUD/Admin/index.html.twig' %}
+
+{% block title %}
+ {% include('@ChillMain/CRUD/_edit_title.html.twig') %}
+{% endblock %}
+
+{% block admin_content %}
+ {% embed '@ChillMain/CRUD/_edit_content.html.twig' %}
+ {% block content_form_actions_save_and_show %}{% endblock %}
+ {% endembed %}
+{% endblock admin_content %}
diff --git a/src/Bundle/ChillMainBundle/Resources/views/Admin/Regroupment/index.html.twig b/src/Bundle/ChillMainBundle/Resources/views/Admin/Regroupment/index.html.twig
new file mode 100644
index 000000000..06e646083
--- /dev/null
+++ b/src/Bundle/ChillMainBundle/Resources/views/Admin/Regroupment/index.html.twig
@@ -0,0 +1,39 @@
+{% extends '@ChillMain/CRUD/Admin/index.html.twig' %}
+
+{% block admin_content %}
+ {% embed '@ChillMain/CRUD/_index.html.twig' %}
+ {% block table_entities_thead_tr %}
+ {{ 'Label'|trans }}
+ {{ 'Active'|trans }}
+
+ {% endblock %}
+
+ {% block table_entities_tbody %}
+ {% for entity in entities %}
+
+ {{ entity.name }}
+
+ {% if entity.isActive %}
+
+ {% else %}
+
+ {% endif %}
+
+
+
+
+
+ {% endfor %}
+ {% endblock %}
+
+ {% block actions_before %}
+
+ {{'Back to the admin'|trans}}
+
+ {% endblock %}
+ {% endembed %}
+{% endblock %}
diff --git a/src/Bundle/ChillMainBundle/Resources/views/Admin/Regroupment/new.html.twig b/src/Bundle/ChillMainBundle/Resources/views/Admin/Regroupment/new.html.twig
new file mode 100644
index 000000000..7c204dddd
--- /dev/null
+++ b/src/Bundle/ChillMainBundle/Resources/views/Admin/Regroupment/new.html.twig
@@ -0,0 +1,11 @@
+{% extends '@ChillMain/CRUD/Admin/index.html.twig' %}
+
+{% block title %}
+ {% include('@ChillMain/CRUD/_new_title.html.twig') %}
+{% 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/ChillMainBundle/Resources/views/Admin/layoutWithVerticalMenu.html.twig b/src/Bundle/ChillMainBundle/Resources/views/Admin/layoutWithVerticalMenu.html.twig
index 75494473a..7268c6cac 100644
--- a/src/Bundle/ChillMainBundle/Resources/views/Admin/layoutWithVerticalMenu.html.twig
+++ b/src/Bundle/ChillMainBundle/Resources/views/Admin/layoutWithVerticalMenu.html.twig
@@ -28,10 +28,15 @@
{% endif %}
-
- {% block admin_content %}
-
- {% endblock %}
+
+
+
+ {% block admin_content %}
+
+ {% endblock %}
+
+
+
{% block vertical_menu_content %}
diff --git a/src/Bundle/ChillMainBundle/Resources/views/CRUD/_delete_content.html.twig b/src/Bundle/ChillMainBundle/Resources/views/CRUD/_delete_content.html.twig
index c47f4fbf4..8ba0a21f6 100644
--- a/src/Bundle/ChillMainBundle/Resources/views/CRUD/_delete_content.html.twig
+++ b/src/Bundle/ChillMainBundle/Resources/views/CRUD/_delete_content.html.twig
@@ -1,4 +1,4 @@
-
+
{% block crud_content_header %}
{{ ('crud.'~crud_name~'.title_delete')|trans({ '%as_string%': entity|chill_entity_render_string }) }}
{% endblock crud_content_header %}
@@ -34,4 +34,4 @@
{{ form_end(form) }}
-
+
diff --git a/src/Bundle/ChillMainBundle/Resources/views/CRUD/_edit_content.html.twig b/src/Bundle/ChillMainBundle/Resources/views/CRUD/_edit_content.html.twig
index a26eb2e4a..e23949162 100644
--- a/src/Bundle/ChillMainBundle/Resources/views/CRUD/_edit_content.html.twig
+++ b/src/Bundle/ChillMainBundle/Resources/views/CRUD/_edit_content.html.twig
@@ -1,5 +1,5 @@
-{% set formId = crudMainFormId|default('crud_main_form') %}
-
+ {% set formId = crudMainFormId|default('crud_main_form') %}
+
{% block crud_content_header %}
{{ ('crud.'~crud_name~'.title_edit')|trans }}
{% endblock crud_content_header %}
@@ -64,4 +64,4 @@
{% endblock %}
{% endblock %}
-
+
diff --git a/src/Bundle/ChillMainBundle/Resources/views/CRUD/_index.html.twig b/src/Bundle/ChillMainBundle/Resources/views/CRUD/_index.html.twig
index 15774bdf6..eaacc1f73 100644
--- a/src/Bundle/ChillMainBundle/Resources/views/CRUD/_index.html.twig
+++ b/src/Bundle/ChillMainBundle/Resources/views/CRUD/_index.html.twig
@@ -1,5 +1,3 @@
-
-
{% block index_header %}
{{ ('crud.' ~ crud_name ~ '.index.title')|trans({'%crud_name%': crud_name}) }}
{% endblock index_header %}
@@ -16,7 +14,7 @@
{% endblock %}
{% else %}
{% block table_entities %}
-
+
{% block table_entities_thead_tr %}
@@ -54,4 +52,3 @@
{% endblock %}
{% endblock list_actions %}
-
diff --git a/src/Bundle/ChillMainBundle/Resources/views/CRUD/_new_content.html.twig b/src/Bundle/ChillMainBundle/Resources/views/CRUD/_new_content.html.twig
index 906a77d0d..2854123fa 100644
--- a/src/Bundle/ChillMainBundle/Resources/views/CRUD/_new_content.html.twig
+++ b/src/Bundle/ChillMainBundle/Resources/views/CRUD/_new_content.html.twig
@@ -1,5 +1,5 @@
-{% set formId = crudMainFormId|default('crud_main_form') %}
-
+ {% set formId = crudMainFormId|default('crud_main_form') %}
+
{% block crud_content_header %}
{{ ('crud.' ~ crud_name ~ '.title_new')|trans({'%crud_name%' : crud_name }) }}
{% endblock crud_content_header %}
@@ -52,4 +52,4 @@
{{ form_end(form) }}
{% endblock %}
-
+
diff --git a/src/Bundle/ChillMainBundle/Resources/views/CRUD/_view_content.html.twig b/src/Bundle/ChillMainBundle/Resources/views/CRUD/_view_content.html.twig
index b6f54cba0..203a24926 100644
--- a/src/Bundle/ChillMainBundle/Resources/views/CRUD/_view_content.html.twig
+++ b/src/Bundle/ChillMainBundle/Resources/views/CRUD/_view_content.html.twig
@@ -1,4 +1,4 @@
-
+
{% block crud_content_header %}
{{ 'crud.%crud_name%.title_view'|trans({'%crud_name%' : crud_name }) }}
{% endblock crud_content_header %}
@@ -60,4 +60,4 @@
{% endblock crud_content_view_actions %}
{% endblock crud_content_view %}
-
+
diff --git a/src/Bundle/ChillMainBundle/Resources/views/Center/edit.html.twig b/src/Bundle/ChillMainBundle/Resources/views/Center/edit.html.twig
index 30bea2d6e..1894a1402 100644
--- a/src/Bundle/ChillMainBundle/Resources/views/Center/edit.html.twig
+++ b/src/Bundle/ChillMainBundle/Resources/views/Center/edit.html.twig
@@ -7,8 +7,6 @@
{{ form_start(edit_form) }}
{{ form_row(edit_form.name) }}
- {{ form_row(edit_form.submit, { 'attr' : { 'class' : 'btn btn-chill-green' } } ) }}
- {{ form_end(edit_form) }}
+
+ {{ form_end(edit_form) }}
{% endblock %}
diff --git a/src/Bundle/ChillMainBundle/Resources/views/Center/index.html.twig b/src/Bundle/ChillMainBundle/Resources/views/Center/index.html.twig
index d6d4bb4cd..cb2da8a62 100644
--- a/src/Bundle/ChillMainBundle/Resources/views/Center/index.html.twig
+++ b/src/Bundle/ChillMainBundle/Resources/views/Center/index.html.twig
@@ -1,39 +1,50 @@
-{% extends '@ChillMain/Admin/layoutWithVerticalMenu.html.twig' %}
+{% extends '@ChillMain/CRUD/Admin/index.html.twig' %}
{% block title %}{{ 'Center list'|trans }}{% endblock %}
{% block admin_content -%}
- {{ 'Center list'|trans }}
-
-
-
-
- {{ 'Name'|trans }}
- {{ 'Actions'|trans }}
-
-
-
- {% for entity in entities %}
-
- {{ entity.name }}
-
-
-
-
- {% endfor %}
-
-
-
-
+ {% embed '@ChillMain/CRUD/_index.html.twig' %}
+
+ {% block index_header %}
+ {{ 'Center list'|trans }}
+ {% endblock %}
+
+ {% block filter_order %}{% endblock %}
+
+ {% block table_entities_thead_tr %}
+ id
+ {{ 'Name'|trans }}
+ {{ 'Actions'|trans }}
+ {% endblock %}
+
+ {% block table_entities_tbody %}
+ {% for entity in entities %}
+
+ {{ entity.id }}
+ {{ entity.name }}
+
+
+
+
+ {% endfor %}
+ {% endblock %}
+
+ {% block pagination %}{% endblock %}
+
+ {% block list_actions %}
+
+ {% endblock list_actions %}
+
+ {% endembed %}
{% endblock %}
diff --git a/src/Bundle/ChillMainBundle/Resources/views/Center/new.html.twig b/src/Bundle/ChillMainBundle/Resources/views/Center/new.html.twig
index ef614722b..cc64b37c2 100644
--- a/src/Bundle/ChillMainBundle/Resources/views/Center/new.html.twig
+++ b/src/Bundle/ChillMainBundle/Resources/views/Center/new.html.twig
@@ -7,8 +7,6 @@
{{ form_start(form) }}
{{ form_row(form.name) }}
- {{ form_row(form.submit, { 'attr' : { 'class' : 'btn btn-chill-green' } } ) }}
- {{ form_end(form) }}
+
+ {{ form_end(form) }}
{% endblock %}
diff --git a/src/Bundle/ChillMainBundle/Resources/views/Scope/edit.html.twig b/src/Bundle/ChillMainBundle/Resources/views/Scope/edit.html.twig
index 6330f2b26..a80792dc6 100644
--- a/src/Bundle/ChillMainBundle/Resources/views/Scope/edit.html.twig
+++ b/src/Bundle/ChillMainBundle/Resources/views/Scope/edit.html.twig
@@ -7,8 +7,7 @@
{{ form_start(edit_form) }}
{{ form_row(edit_form.name) }}
- {{ form_row(edit_form.submit, { 'attr' : { 'class' : 'btn btn-chill-green' } } ) }}
- {{ form_end(edit_form) }}
+ {{ form_row(edit_form.active) }}
+
+ {{ form_end(edit_form) }}
+
{% endblock %}
diff --git a/src/Bundle/ChillMainBundle/Resources/views/Scope/index.html.twig b/src/Bundle/ChillMainBundle/Resources/views/Scope/index.html.twig
index 444ba2cc5..60beb7ed7 100644
--- a/src/Bundle/ChillMainBundle/Resources/views/Scope/index.html.twig
+++ b/src/Bundle/ChillMainBundle/Resources/views/Scope/index.html.twig
@@ -1,39 +1,58 @@
-{% extends '@ChillMain/Admin/layoutWithVerticalMenu.html.twig' %}
+{% extends '@ChillMain/CRUD/Admin/index.html.twig' %}
{% block title %}{{ 'List circles'|trans }}{% endblock %}
{% block admin_content -%}
- {{ 'List circles'|trans }}
+ {% embed '@ChillMain/CRUD/_index.html.twig' %}
+
+ {% block index_header %}
+ {{ 'List circles'|trans }}
+ {% endblock %}
+
+ {% block filter_order %}{% endblock %}
+
+ {% block table_entities_thead_tr %}
+ id
+ {{ 'Name'|trans }}
+ {{ 'Active'|trans }}
+ {{ 'Actions'|trans }}
+ {% endblock %}
+
+ {% block table_entities_tbody %}
+ {% for entity in entities %}
+
+ {{ entity.id }}
+ {{ entity.name|localize_translatable_string }}
+
+ {%- if entity.active -%}
+
+ {%- else -%}
+
+ {%- endif -%}
+
+
+
+
+
+ {% endfor %}
+ {% endblock %}
+
+ {% block pagination %}{% endblock %}
+
+ {% block list_actions %}
+
+ {% endblock list_actions %}
-
-
-
- {{ 'Name'|trans }}
- {{ 'Actions'|trans }}
-
-
-
- {% for entity in entities %}
-
- {{ entity.name|localize_translatable_string }}
-
-
-
-
- {% endfor %}
-
-
-
-
+ {% endembed %}
{% endblock %}
diff --git a/src/Bundle/ChillMainBundle/Resources/views/Scope/new.html.twig b/src/Bundle/ChillMainBundle/Resources/views/Scope/new.html.twig
index 56eb110d0..0c28a396e 100644
--- a/src/Bundle/ChillMainBundle/Resources/views/Scope/new.html.twig
+++ b/src/Bundle/ChillMainBundle/Resources/views/Scope/new.html.twig
@@ -7,8 +7,7 @@
{{ form_start(form) }}
{{ form_row(form.name) }}
- {{ form_row(form.submit, { 'attr' : { 'class' : 'btn btn-chill-green' } } ) }}
- {{ form_end(form) }}
+ {{ form_row(form.active) }}
+ {{ form_end(form) }}
{% endblock %}
diff --git a/src/Bundle/ChillMainBundle/Resources/views/User/index.html.twig b/src/Bundle/ChillMainBundle/Resources/views/User/index.html.twig
index ec93cf8a7..0f1168113 100644
--- a/src/Bundle/ChillMainBundle/Resources/views/User/index.html.twig
+++ b/src/Bundle/ChillMainBundle/Resources/views/User/index.html.twig
@@ -1,83 +1,99 @@
-{% extends '@ChillMain/Admin/layoutWithVerticalMenu.html.twig' %}
+{% extends '@ChillMain/CRUD/Admin/index.html.twig' %}
{% block admin_content %}
-
- {{"Users"|trans}}
-
- {{ filter_order|chill_render_filter_order_helper }}
-
- {% for entity in entities %}
-
-
-
-
- {% if entity.civility is not null %}
- {% if entity.civility.name|length > 0 %}
- {{ entity.civility.name|first }}
+ {% embed '@ChillMain/CRUD/_index.html.twig' %}
+
+ {% block index_header %}
+
{{"Users"|trans}}
+ {% endblock %}
+
+ {% block filter_order %}{{ filter_order|chill_render_filter_order_helper }}{% endblock %}
+
+ {% block table_entities_thead_tr %}
+
{{ 'Active'|trans }}
+
{{ 'Username'|trans }}
+
{{ 'Datas'|trans }}
+
{{ 'Actions'|trans }}
+ {% endblock %}
+
+ {% block table_entities_tbody %}
+ {% for entity in entities %}
+
+
+ {% if entity.isEnabled %}
+
+ {% else %}
+
{% endif %}
- {% endif %}
- {{ entity.label }}
- {% if entity.isEnabled %}
-
- {% else %}
-
- {% endif %}
-
- {{ entity.email }}
-
-
-
- login: {{ entity.username|e('html_attr') }}
-
-
- {% if entity.userJob %}
- {{ entity.userJob.label|localize_translatable_string }}
- {% endif %}
-
-
-
-
- {% if entity.mainScope %}
- {{ entity.mainScope.name|localize_translatable_string }}
- {% endif %}
- {% if entity.mainCenter %}
- , {{ entity.mainCenter.name }}
- {% endif %}
-
-
-
-
-
-
-
-
- {% if allow_change_password is same as(true) %}
-
-
-
- {% endif %}
-
- {% if is_granted('ROLE_ALLOWED_TO_SWITCH') %}
-
-
-
- {% endif %}
-
-
-
-
-
- {% endfor %}
-
- {{ chill_pagination(paginator) }}
-
-
-
+
+
+ {#
+ {% if entity.civility is not null %}
+ {% if entity.civility.name|length > 0 %}
+ {{ entity.civility.name|first }}
+ {% endif %}
+ {% endif %}
+ #}
+ {{ entity.label }}
+
+
+
+
+ login:
+ {{ entity.username|e('html_attr') }}
+
+
+ email:
+ {{ entity.email }}
+
+
+ métier:
+ {% if entity.userJob %}{{ entity.userJob.label|localize_translatable_string }}{% endif %}
+
+
+ cercle/centre:
+ {% if entity.mainScope %}
+ {{ entity.mainScope.name|localize_translatable_string }}
+ {% endif %}
+ {% if entity.mainCenter %}, {{ entity.mainCenter.name }}{% endif %}
+
+
+
+
+
+
+
+
+
+ {% if allow_change_password is same as(true) %}
+
+
+
+ {% endif %}
+
+ {% if is_granted('ROLE_ALLOWED_TO_SWITCH') %}
+
+
+
+ {% endif %}
+
+
+
+ {% endfor %}
+ {% endblock %}
+
+ {% block pagination %}{{ chill_pagination(paginator) }}{% endblock %}
+
+ {% block list_actions %}
+
+ {% endblock list_actions %}
+
+ {% endembed %}
{% endblock %}
diff --git a/src/Bundle/ChillMainBundle/Resources/views/UserJob/index.html.twig b/src/Bundle/ChillMainBundle/Resources/views/UserJob/index.html.twig
index 3d56265dc..e8ea9ec38 100644
--- a/src/Bundle/ChillMainBundle/Resources/views/UserJob/index.html.twig
+++ b/src/Bundle/ChillMainBundle/Resources/views/UserJob/index.html.twig
@@ -2,12 +2,14 @@
{% block admin_content %}
{% embed '@ChillMain/CRUD/_index.html.twig' %}
+
{% block table_entities_thead_tr %}
id
-
{{ 'label'|trans }}
-
{{ 'active'|trans }}
-
+
{{ 'Label'|trans }}
+
{{ 'Active'|trans }}
+
{{ 'Actions'|trans }}
{% endblock %}
+
{% block table_entities_tbody %}
{% for entity in entities %}
@@ -30,11 +32,12 @@
{% endfor %}
{% endblock %}
-
+
{% block actions_before %}
{{'Back to the admin'|trans}}
{% endblock %}
+
{% endembed %}
{% endblock %}
diff --git a/src/Bundle/ChillMainBundle/Resources/views/Workflow/_attachment.html.twig b/src/Bundle/ChillMainBundle/Resources/views/Workflow/_attachment.html.twig
index b825e4d43..24cf3cab4 100644
--- a/src/Bundle/ChillMainBundle/Resources/views/Workflow/_attachment.html.twig
+++ b/src/Bundle/ChillMainBundle/Resources/views/Workflow/_attachment.html.twig
@@ -1,4 +1,7 @@
-{# TODO Adapt condition #}
+{# TODO
+ Check if this template is used
+ Adapt condition or Delete it
+#}
{% if random(1) == 0 %}
{# For a document #}
@@ -22,7 +25,7 @@
{# For an action #}
{{ 'Accompanying Course Action'|trans ~ 'target'|trans }}
-
+
{# dynamic insertion
::: TODO delete all static insertion, remove condition and pass work object in inclusion
#}{% if dynamic is defined %}
diff --git a/src/Bundle/ChillMainBundle/Routing/MenuBuilder/AdminLanguageMenuBuilder.php b/src/Bundle/ChillMainBundle/Routing/MenuBuilder/AdminLanguageMenuBuilder.php
index a13b33a1e..0d91a0438 100644
--- a/src/Bundle/ChillMainBundle/Routing/MenuBuilder/AdminLanguageMenuBuilder.php
+++ b/src/Bundle/ChillMainBundle/Routing/MenuBuilder/AdminLanguageMenuBuilder.php
@@ -40,7 +40,6 @@ class AdminLanguageMenuBuilder implements LocalMenuBuilderInterface
->setAttribute('class', 'list-group-item-header')
->setExtras([
'order' => 1200,
- 'icons' => ['globe-w'],
]);
$menu->addChild('Language list', [
'route' => 'chill_crud_main_language_index',
diff --git a/src/Bundle/ChillMainBundle/Routing/MenuBuilder/AdminLocationMenuBuilder.php b/src/Bundle/ChillMainBundle/Routing/MenuBuilder/AdminLocationMenuBuilder.php
index 081d5d84a..b69399daf 100644
--- a/src/Bundle/ChillMainBundle/Routing/MenuBuilder/AdminLocationMenuBuilder.php
+++ b/src/Bundle/ChillMainBundle/Routing/MenuBuilder/AdminLocationMenuBuilder.php
@@ -40,7 +40,6 @@ class AdminLocationMenuBuilder implements LocalMenuBuilderInterface
->setAttribute('class', 'list-group-item-header')
->setExtras([
'order' => 1300,
- 'icons' => ['map-marker'],
]);
$menu->addChild('Location type list', [
diff --git a/src/Bundle/ChillMainBundle/Routing/MenuBuilder/AdminUserMenuBuilder.php b/src/Bundle/ChillMainBundle/Routing/MenuBuilder/AdminUserMenuBuilder.php
index 5cb4e087b..7bd23c81f 100644
--- a/src/Bundle/ChillMainBundle/Routing/MenuBuilder/AdminUserMenuBuilder.php
+++ b/src/Bundle/ChillMainBundle/Routing/MenuBuilder/AdminUserMenuBuilder.php
@@ -46,13 +46,16 @@ class AdminUserMenuBuilder implements LocalMenuBuilderInterface
->setAttribute('class', 'list-group-item-header')
->setExtras([
'order' => 1000,
- 'icons' => ['key'],
]);
$menu->addChild('Center list', [
'route' => 'admin_center',
])->setExtras(['order' => 1010]);
+ $menu->addChild('Regroupements des centres', [
+ 'route' => 'chill_crud_regroupment_index',
+ ])->setExtras(['order' => 1015]);
+
$menu->addChild('List circles', [
'route' => 'admin_scope',
])->setExtras(['order' => 1020]);
diff --git a/src/Bundle/ChillMainBundle/config/services/controller.yaml b/src/Bundle/ChillMainBundle/config/services/controller.yaml
index 28abc94e8..16c545a81 100644
--- a/src/Bundle/ChillMainBundle/config/services/controller.yaml
+++ b/src/Bundle/ChillMainBundle/config/services/controller.yaml
@@ -33,3 +33,7 @@ services:
arguments:
$security: '@Symfony\Component\Security\Core\Security'
tags: ['controller.service_arguments']
+
+ Chill\MainBundle\Controller\RegroupmentController:
+ autowire: true
+ autoconfigure: true
diff --git a/src/Bundle/ChillMainBundle/config/services/form.yaml b/src/Bundle/ChillMainBundle/config/services/form.yaml
index 58f01883f..8157c27e9 100644
--- a/src/Bundle/ChillMainBundle/config/services/form.yaml
+++ b/src/Bundle/ChillMainBundle/config/services/form.yaml
@@ -138,6 +138,10 @@ services:
autowire: true
autoconfigure: true
+ Chill\MainBundle\Form\RegroupmentType:
+ autowire: true
+ autoconfigure: true
+
Chill\MainBundle\Form\DataTransformer\IdToLocationDataTransformer: ~
Chill\MainBundle\Form\DataTransformer\IdToUserDataTransformer: ~
Chill\MainBundle\Form\DataTransformer\IdToUsersDataTransformer: ~
diff --git a/src/Bundle/ChillMainBundle/migrations/Version20230111104315.php b/src/Bundle/ChillMainBundle/migrations/Version20230111104315.php
new file mode 100644
index 000000000..aa6e0f4c5
--- /dev/null
+++ b/src/Bundle/ChillMainBundle/migrations/Version20230111104315.php
@@ -0,0 +1,43 @@
+addSql('DROP SEQUENCE regroupment_id_seq CASCADE');
+ $this->addSql('ALTER TABLE regroupment_center DROP CONSTRAINT FK_2BCCE2F9EC6D1029');
+ $this->addSql('ALTER TABLE regroupment_center DROP CONSTRAINT FK_2BCCE2F95932F377');
+ $this->addSql('DROP TABLE regroupment');
+ $this->addSql('DROP TABLE regroupment_center');
+ }
+
+ public function getDescription(): string
+ {
+ return 'Add regroupment admin entity';
+ }
+
+ public function up(Schema $schema): void
+ {
+ $this->addSql('CREATE SEQUENCE regroupment_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
+ $this->addSql('CREATE TABLE regroupment (id INT NOT NULL, name VARCHAR(15) DEFAULT \'\' NOT NULL, isActive BOOLEAN NOT NULL, PRIMARY KEY(id))');
+ $this->addSql('CREATE TABLE regroupment_center (regroupment_id INT NOT NULL, center_id INT NOT NULL, PRIMARY KEY(regroupment_id, center_id))');
+ $this->addSql('CREATE INDEX IDX_2BCCE2F9EC6D1029 ON regroupment_center (regroupment_id)');
+ $this->addSql('CREATE INDEX IDX_2BCCE2F95932F377 ON regroupment_center (center_id)');
+ $this->addSql('ALTER TABLE regroupment_center ADD CONSTRAINT FK_2BCCE2F9EC6D1029 FOREIGN KEY (regroupment_id) REFERENCES regroupment (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE');
+ $this->addSql('ALTER TABLE regroupment_center ADD CONSTRAINT FK_2BCCE2F95932F377 FOREIGN KEY (center_id) REFERENCES centers (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE');
+ }
+}
diff --git a/src/Bundle/ChillMainBundle/translations/messages.fr.yml b/src/Bundle/ChillMainBundle/translations/messages.fr.yml
index b416480a9..b092805c6 100644
--- a/src/Bundle/ChillMainBundle/translations/messages.fr.yml
+++ b/src/Bundle/ChillMainBundle/translations/messages.fr.yml
@@ -41,6 +41,7 @@ Last updated on: Dernière mise à jour le
by_user: "par "
lifecycleUpdate: Evenements de création et mise à jour
address_fields: Données liées à l'adresse
+Datas: Données
inactive: inactif
@@ -70,6 +71,7 @@ Centers: Centres
center: centre
comment: commentaire
Comment: Commentaire
+Comments: Commentaires
Pinned comment: Commentaire épinglé
Any comment: Aucun commentaire
Read more: Lire la suite
@@ -409,6 +411,12 @@ crud:
add_new: Ajouter une civilité
title_new: Nouvelle civilité
title_edit: Modifier une civilité
+ regroupment:
+ index:
+ title: Liste des regroupements
+ add_new: Ajouter un regroupement
+ title_new: Nouveau regroupement
+ title_edit: Modifier un regroupement
No entities: Aucun élément
diff --git a/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseWorkController.php b/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseWorkController.php
index 7b77252be..8d15ca30f 100644
--- a/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseWorkController.php
+++ b/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseWorkController.php
@@ -178,6 +178,27 @@ class AccompanyingCourseWorkController extends AbstractController
]);
}
+ /**
+ * @Route(
+ * "{_locale}/person/accompanying-period/work/{id}/show",
+ * name="chill_person_accompanying_period_work_show",
+ * methods={"GET"}
+ * )
+ */
+ public function showWork(AccompanyingPeriodWork $work): Response
+ {
+ if (null === $work) {
+ throw $this->createNotFoundException('Unable to find Work entity.');
+ }
+
+ $this->denyAccessUnlessGranted(AccompanyingPeriodWorkVoter::SEE, $work);
+
+ return $this->render('@ChillPerson/AccompanyingCourseWork/show.html.twig', [
+ 'accompanyingCourse' => $work->getAccompanyingPeriod(),
+ 'work' => $work,
+ ]);
+ }
+
private function createDeleteForm(int $id): Form
{
$params = [];
diff --git a/src/Bundle/ChillPersonBundle/Controller/SocialWorkSocialActionApiController.php b/src/Bundle/ChillPersonBundle/Controller/SocialWorkSocialActionApiController.php
index a0d15b6db..3ae5c5b7c 100644
--- a/src/Bundle/ChillPersonBundle/Controller/SocialWorkSocialActionApiController.php
+++ b/src/Bundle/ChillPersonBundle/Controller/SocialWorkSocialActionApiController.php
@@ -14,6 +14,7 @@ namespace Chill\PersonBundle\Controller;
use Chill\MainBundle\CRUD\Controller\ApiController;
use Chill\MainBundle\Pagination\PaginatorFactory;
use Chill\MainBundle\Serializer\Model\Collection;
+use Chill\PersonBundle\Entity\SocialWork\SocialAction;
use Chill\PersonBundle\Repository\SocialWork\SocialIssueRepository;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
@@ -41,7 +42,12 @@ class SocialWorkSocialActionApiController extends ApiController
throw $this->createNotFoundException('socialIssue not found');
}
- $socialActions = $socialIssue->getRecursiveSocialActions();
+ $socialActions = $socialIssue->getRecursiveSocialActions()->toArray();
+
+ usort($socialActions, static function (SocialAction $sa, SocialAction $sb) {
+ return $sa->getOrdering() <=> $sb->getOrdering();
+ });
+
$pagination = $this->paginator->create(count($socialActions));
// max one page
$pagination->setItemsPerPage(count($socialActions));
diff --git a/src/Bundle/ChillPersonBundle/Menu/AdminAccompanyingCourseMenuBuilder.php b/src/Bundle/ChillPersonBundle/Menu/AdminAccompanyingCourseMenuBuilder.php
index f75d2844b..42c5dd4c2 100644
--- a/src/Bundle/ChillPersonBundle/Menu/AdminAccompanyingCourseMenuBuilder.php
+++ b/src/Bundle/ChillPersonBundle/Menu/AdminAccompanyingCourseMenuBuilder.php
@@ -39,7 +39,6 @@ class AdminAccompanyingCourseMenuBuilder implements LocalMenuBuilderInterface
->setAttribute('class', 'list-group-item-header')
->setExtras([
'order' => 2200,
- 'icons' => ['random'],
]);
$menu->addChild('person_admin.closing motives', [
diff --git a/src/Bundle/ChillPersonBundle/Menu/AdminHouseholdMenuBuilder.php b/src/Bundle/ChillPersonBundle/Menu/AdminHouseholdMenuBuilder.php
index 6a9e9dedc..0cbc48330 100644
--- a/src/Bundle/ChillPersonBundle/Menu/AdminHouseholdMenuBuilder.php
+++ b/src/Bundle/ChillPersonBundle/Menu/AdminHouseholdMenuBuilder.php
@@ -39,7 +39,6 @@ class AdminHouseholdMenuBuilder implements LocalMenuBuilderInterface
->setAttribute('class', 'list-group-item-header')
->setExtras([
'order' => 2100,
- 'icons' => ['home'],
]);
$menu->addChild('Position', [
diff --git a/src/Bundle/ChillPersonBundle/Menu/AdminPersonMenuBuilder.php b/src/Bundle/ChillPersonBundle/Menu/AdminPersonMenuBuilder.php
index 8459e4b89..ee2dad9dc 100644
--- a/src/Bundle/ChillPersonBundle/Menu/AdminPersonMenuBuilder.php
+++ b/src/Bundle/ChillPersonBundle/Menu/AdminPersonMenuBuilder.php
@@ -39,7 +39,6 @@ class AdminPersonMenuBuilder implements LocalMenuBuilderInterface
->setAttribute('class', 'list-group-item-header')
->setExtras([
'order' => 2000,
- 'icons' => ['child'],
]);
$menu->addChild('Civility', [
diff --git a/src/Bundle/ChillPersonBundle/Menu/AdminSocialWorkMenuBuilder.php b/src/Bundle/ChillPersonBundle/Menu/AdminSocialWorkMenuBuilder.php
index cec672dd2..2b98c98a6 100644
--- a/src/Bundle/ChillPersonBundle/Menu/AdminSocialWorkMenuBuilder.php
+++ b/src/Bundle/ChillPersonBundle/Menu/AdminSocialWorkMenuBuilder.php
@@ -39,7 +39,6 @@ class AdminSocialWorkMenuBuilder implements LocalMenuBuilderInterface
->setAttribute('class', 'list-group-item-header')
->setExtras([
'order' => 2300,
- 'icons' => ['handshake-o'],
]);
$menu->addChild('person_admin.social_action', [
diff --git a/src/Bundle/ChillPersonBundle/Resources/public/chill/scss/accompanying_period_work.scss b/src/Bundle/ChillPersonBundle/Resources/public/chill/scss/accompanying_period_work.scss
index ed474911f..eeb2eb2be 100644
--- a/src/Bundle/ChillPersonBundle/Resources/public/chill/scss/accompanying_period_work.scss
+++ b/src/Bundle/ChillPersonBundle/Resources/public/chill/scss/accompanying_period_work.scss
@@ -1,13 +1,16 @@
-/// AccompanyingCourse Work list Page
-div.accompanying_course_work-list {
+/// AccompanyingCourse Work Pages
+div.accompanying-course-work {
table.obj-res-eval {
border-collapse: collapse;
border-radius: 5px;
width: 100%;
+ margin-top: 1em;
+ margin-bottom: 1em;
&, tr, th, td {
border: 1px solid lightgray;
padding: 0.3em;
+ background-color: $white;
}
th {
h4.title_label {
@@ -26,6 +29,11 @@ div.accompanying_course_work-list {
}
td.eval {
width: 100%;
+ div.download {
+ .row > * {
+ transform: scale(0.85);
+ }
+ }
}
}
@@ -47,10 +55,32 @@ div.accompanying_course_work-list {
}
}
+ div.item-bloc {
+ &.short {}
+ &.long {}
+ &.uniq {}
+ &.extended {
+ table.obj-res-eval {
+ margin-top: 0;
+ &:last-child {
+ margin-bottom: 0;
+ }
+ }
+ }
+ &.colored {
+ background-color: $chill-llight-gray;
+ }
+ }
+
}
-div.flex-table div.item-bloc:nth-child(2n) table.obj-res-eval {
- &, tr, th, td {
- background-color: $chill-llight-gray;
+/// item-bloc with background-color altern: even case
+div.flex-table div.item-bloc:nth-child(2n) {
+
+ // set table background
+ table.obj-res-eval {
+ &, tr, th, td {
+ background-color: $chill-llight-gray;
+ }
}
}
diff --git a/src/Bundle/ChillPersonBundle/Resources/public/chill/scss/badge.scss b/src/Bundle/ChillPersonBundle/Resources/public/chill/scss/badge.scss
index b359f84d6..072f13949 100644
--- a/src/Bundle/ChillPersonBundle/Resources/public/chill/scss/badge.scss
+++ b/src/Bundle/ChillPersonBundle/Resources/public/chill/scss/badge.scss
@@ -128,7 +128,7 @@ ul.columns { // XS:1 SM:2 MD:1 LG:2 XL:2 XXL:2
}
/// dashboard_like_badge in AccompanyingCourse Work list Page
-div[class*='accompanying_course_work'] {
+div[class*='accompanying-course-work'] {
div.dashboard,
h4.badge-title,
h3.badge-title,
diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/store/index.js b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/store/index.js
index 8324a3d82..c2ded503b 100644
--- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/store/index.js
+++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/store/index.js
@@ -785,7 +785,7 @@ let initPromise = (root) => Promise.all([getScopesPromise(root), accompanyingCou
return makeFetch('PATCH', url, body)
.then((response) => {
commit('updateReferrer', response.user);
- if (null !== payload.user_job && payload.user_job !== state.accompanyingCourse.job) {
+ if (null !== payload && null !== payload.user_job && payload.user_job !== state.accompanyingCourse.job) {
this.dispatch('updateJob', payload.user_job);
}
// commit('setFilteredReferrersSuggested'); // this mutation doesn't exist?
diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/App.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/App.vue
index 04c753358..9a105dd8d 100644
--- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/App.vue
+++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/App.vue
@@ -1,5 +1,5 @@
-
+
diff --git a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/layout.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/layout.html.twig
index f54cbbb33..bd16a1fbe 100644
--- a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/layout.html.twig
+++ b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/layout.html.twig
@@ -1,9 +1,5 @@
{% extends "@ChillMain/layoutWithVerticalMenu.html.twig" %}
-{% block head_custom %}
-
-{% endblock %}
-
{% block top_banner %}
{{ include('@ChillPerson/AccompanyingCourse/banner.html.twig', { title: block('title') }) }}
{% endblock %}
diff --git a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/_item.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/_item.html.twig
index 3d4f46425..8ab7a932c 100644
--- a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/_item.html.twig
+++ b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/_item.html.twig
@@ -1,4 +1,10 @@
-
+{#
+# OPTIONS
+# - itemBlocClass: [uniq|colored|extended]
+# - displayContent: [short|long] default: short
+# - displayAction: [true|false] default: false
+#}
+
@@ -15,6 +21,13 @@
{{ 'accompanying_course_work.end_date'|trans ~ ' : ' }}
{{ w.endDate|format_date('short') }}
+ {% else %}
+ {% if displayContent is defined and displayContent == 'long' %}
+
+ {{ 'accompanying_course_work.end_date'|trans ~ ' : ' }}
+ {{ 'Not given'|trans }}
+
+ {% endif %}
{% endif %}
@@ -25,7 +38,7 @@
- {%- if w.persons -%}
+ {%- if w.persons -%}{# Usagers du parcours #}
{{ 'Persons in accompanying course'|trans }}
@@ -45,7 +58,7 @@
{% endif %}
- {%- if w.handlingThierParty -%}
+ {%- if w.handlingThierParty -%}{# Tiers traitant #}
{{ 'Thirdparty handling'|trans }}
@@ -62,23 +75,25 @@
{% endif %}
- {%- if w.referrers -%}
-
-
-
{{ 'Referrers'|trans }}
-
-
+
{# Agents traitants #}
+
+
{%- if w.referrers|length > 1 -%}{{ 'Referrers'|trans }}{% else %}{{ 'Referrer2'|trans }}{% endif %}
+
+
+ {%- if w.referrers|length > 0 -%}
{% for u in w.referrers %}
{{ u|chill_entity_render_box }}
{% if not loop.last %}, {% endif %}
{% endfor %}
-
+ {% else %}
+
{{ 'No referrer'|trans }}
+ {% endif %}
- {% endif %}
+
- {%- if w.socialAction.issue -%}
+ {%- if w.socialAction.issue -%}{# Problématique sociale #}
{{ 'Social issue'|trans }}
@@ -94,56 +109,94 @@
-
- {% include 'ChillPersonBundle:AccompanyingCourseWork:_objectifs_results_evaluations.html.twig' %}
-
-
-
+
+{#
+ # This is for 'long' version of content
+ # Note: this include is wrapped in a flex-table container.
+ # We start by closing the flex-table so we can add more.
+ # At the end we leave the last flex-table open, as it will be closed in the container.
+#}
+{% if displayContent is defined and displayContent == 'long' %}
+
+
+ {% if w.results|length > 0 or w.goals|length > 0 or w.accompanyingPeriodWorkEvaluations|length > 0 %}
+
{{ 'Dispositifs' }}
+
+
{# new flex-table wrapper #}
+
+ {% include 'ChillPersonBundle:AccompanyingCourseWork:_objectifs_results_evaluations.html.twig' with {
+ 'displayContent': displayContent
+ } %}
+
+
+ {% endif %}
+
+
{{ 'Comments'|trans }}
+
+
+
+
Public
+ {% if w.note is not empty %}
+
+ {{ w.note|chill_entity_render_box({'metadata': true }) }}
+
+ {% else %}
+
{{ 'No comment associated'|trans }}
+ {% endif %}
+
+ {% if w.privateComment.hasCommentForUser(app.user) %}
+
+
Privé
+
+ {{ w.privateComment.commentForUser(app.user)|chill_markdown_to_html }}
+
+
+ {% endif %}
+ {# Here flex-table stay open ! read above #}
+
+{% endif %}
diff --git a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/_macros.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/_macros.html.twig
new file mode 100644
index 000000000..10a0f94c7
--- /dev/null
+++ b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/_macros.html.twig
@@ -0,0 +1,23 @@
+{% macro metadata(w) %}
+ {% set notif_counter = chill_count_notifications('Chill\\PersonBundle\\Entity\\AccompanyingPeriod\\AccompanyingPeriodWork', w.id) %}
+ {% if notif_counter.total > 0 %}
+ {{ chill_counter_notifications('Chill\\PersonBundle\\Entity\\AccompanyingPeriod\\AccompanyingPeriodWork', w.id) }}
+ {% endif %}
+ {% import '@ChillPerson/Macro/updatedBy.html.twig' as macro %}
+ {{ macro.updatedBy(w) }}
+{% endmacro %}
+
+{% macro workflowButton(w) %}
+ {% set suppEvaluations = [] %}
+ {% for e in w.accompanyingPeriodWorkEvaluations %}
+ {% set suppEvaluations = suppEvaluations|merge([
+ {'relatedEntityClass': 'Chill\\PersonBundle\\Entity\\AccompanyingPeriod\\AccompanyingPeriodWorkEvaluation', 'relatedEntityId': e.id }
+ ]) %}
+ {% for d in e.documents %}
+ {% set suppEvaluations = suppEvaluations|merge([
+ {'relatedEntityClass': 'Chill\\PersonBundle\\Entity\\AccompanyingPeriod\\AccompanyingPeriodWorkEvaluationDocument', 'relatedEntityId': d.id }
+ ]) %}
+ {% endfor %}
+ {% endfor %}
+ {{ chill_entity_workflow_list('Chill\\PersonBundle\\Entity\\AccompanyingPeriod\\AccompanyingPeriodWork', w.id, [], suppEvaluations) }}
+{% endmacro %}
\ No newline at end of file
diff --git a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/_objectifs_results_evaluations.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/_objectifs_results_evaluations.html.twig
index ffa5da9ca..aa3838348 100644
--- a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/_objectifs_results_evaluations.html.twig
+++ b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/_objectifs_results_evaluations.html.twig
@@ -1,6 +1,9 @@
-
+{#
+# OPTIONS
+# - displayContent: [short|long] default: short
+#}
{% if w.results|length > 0 %}
-
+
{{ 'accompanying_course_work.goal'|trans }}
{{ 'accompanying_course_work.results'|trans }}
@@ -23,7 +26,7 @@
{% endif %}
{% if w.goals|length > 0 %}
-
+
{{ 'accompanying_course_work.goal'|trans }}
{{ 'accompanying_course_work.results'|trans }}
@@ -54,7 +57,7 @@
{% endif %}
{% if w.accompanyingPeriodWorkEvaluations|length > 0 %}
-
+
{{ 'accompanying_course_work.evaluations'|trans }}
@@ -72,28 +75,84 @@
{{ 'accompanying_course_work.start_date'|trans ~ ' : ' }}
{{ e.startDate|format_date('short') }}
+
{% if e.endDate %}
{{ 'accompanying_course_work.end_date'|trans ~ ' : ' }}
{{ e.endDate|format_date('short') }}
+ {% else %}
+ {% if displayContent is defined and displayContent == 'long' %}
+
+ {{ 'accompanying_course_work.end_date'|trans ~ ' : ' }}
+ {{ 'Not given'|trans }}
+
+ {% endif %}
{% endif %}
+
{% if e.maxDate %}
{{ 'accompanying_course_work.max_date'|trans ~ ' : ' }}
{{ e.maxDate|format_date('short') }}
+ {% else %}
+ {% if displayContent is defined and displayContent == 'long' %}
+
+ {{ 'accompanying_course_work.max_date'|trans ~ ' : ' }}
+ {{ 'Not given'|trans }}
+
+ {% endif %}
{% endif %}
+
{% if e.warningInterval and e.warningInterval.d > 0 %}
{% set days = (e.warningInterval.d + e.warningInterval.m * 30) %}
{{ 'accompanying_course_work.warning_interval'|trans ~ ' : ' }}
{{ 'accompanying_course_work.%days% days before max_date'|trans({'%days%': days }) }}
+ {% else %}
+ {% if displayContent is defined and displayContent == 'long' %}
+
+ {{ 'accompanying_course_work.warning_interval'|trans ~ ' : ' }}
+ {{ 'Not given'|trans }}
+
+ {% endif %}
{% endif %}
+ {% if displayContent is defined and displayContent == 'long' %}
+
+ {% if e.comment is not empty %}
+ {{ e.comment|chill_entity_render_box }}
+ {% endif %}
+
+ {% import "@ChillDocStore/Macro/macro.html.twig" as m %}
+ {% import "@ChillDocStore/Macro/macro_mimeicon.html.twig" as mm %}
+
+
+ {% if e.documents|length > 0 %}
+
+ {% for d in e.documents %}
+
+
+ {{ d.title }}
+
+
+ {{ mm.mimeIcon(d.storedObject.type) }}
+
+
+ {{ m.download_button_small(d.storedObject, d.title) }}
+
+
+ {% endfor %}
+
+ {% else %}
+
{{ 'No document found'|trans }}
+ {% endif %}
+
+
+ {% endif %}
{% endfor %}
diff --git a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/create.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/create.html.twig
index b09f91cfd..eb358a651 100644
--- a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/create.html.twig
+++ b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/create.html.twig
@@ -4,11 +4,11 @@
{% block content %}
-
+
-
{{ block('title') }}
+
{{ block('title') }}
-
+
{% endblock %}
diff --git a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/delete.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/delete.html.twig
index 37a6812bb..46954323a 100644
--- a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/delete.html.twig
+++ b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/delete.html.twig
@@ -6,7 +6,7 @@
{% block content %}
-
+
{{ work.socialAction|chill_entity_render_string }}
diff --git a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/edit.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/edit.html.twig
index d5ded06cf..c478abfd4 100644
--- a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/edit.html.twig
+++ b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/edit.html.twig
@@ -9,7 +9,7 @@
{% endblock %}
{% block content %}
-
+
diff --git a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/index.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/index.html.twig
index 3efaa2251..b12466e18 100644
--- a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/index.html.twig
+++ b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/index.html.twig
@@ -13,16 +13,20 @@
{% endblock %}
{% block content %}
-
+
{{ block('title') }}
{% if works|length == 0 %}
{{ 'accompanying_course_work.Any work'|trans }}
{% else %}
-
+
{% for w in works %}
- {% include '@ChillPerson/AccompanyingCourseWork/_item.html.twig' with { 'displayAction': true } %}
+ {% include '@ChillPerson/AccompanyingCourseWork/_item.html.twig' with {
+ 'displayAction': true,
+ 'displayContent': 'short',
+ 'itemBlocClass': ''
+ } %}
{% endfor %}
{% endif %}
diff --git a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/list_recent_by_accompanying_period.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/list_recent_by_accompanying_period.html.twig
index 4621cb97a..51c9bf926 100644
--- a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/list_recent_by_accompanying_period.html.twig
+++ b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/list_recent_by_accompanying_period.html.twig
@@ -1,4 +1,4 @@
-
+
+{% endblock %}
+
+{% block block_post_menu %}
+
+{% endblock %}
diff --git a/src/Bundle/ChillPersonBundle/Resources/views/Household/address_edit.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/Household/address_edit.html.twig
index 828f69ef5..35d2d0ddc 100644
--- a/src/Bundle/ChillPersonBundle/Resources/views/Household/address_edit.html.twig
+++ b/src/Bundle/ChillPersonBundle/Resources/views/Household/address_edit.html.twig
@@ -4,17 +4,15 @@
{% block content %}
{{ block('title') }}
-
-
- {# include vue_address component #}
- {% include '@ChillMain/Address/_insert_vue_address.html.twig' with {
- targetEntity: { name: 'household', id: household.id },
- backUrl: path('chill_person_household_addresses', { 'household_id': household.id }),
- openPanesInModal: false,
- stickyActions: true,
- useValidFrom: true,
- useValidTo: true,
- } %}
-
+
+ {# include vue_address component #}
+ {% include '@ChillMain/Address/_insert_vue_address.html.twig' with {
+ targetEntity: { name: 'household', id: household.id },
+ backUrl: path('chill_person_household_addresses', { 'household_id': household.id }),
+ openPanesInModal: false,
+ stickyActions: true,
+ useValidFrom: true,
+ useValidTo: true,
+ } %}
{% endblock %}
diff --git a/src/Bundle/ChillPersonBundle/Resources/views/Household/address_move.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/Household/address_move.html.twig
index b10ef7942..a0844cbec 100644
--- a/src/Bundle/ChillPersonBundle/Resources/views/Household/address_move.html.twig
+++ b/src/Bundle/ChillPersonBundle/Resources/views/Household/address_move.html.twig
@@ -4,18 +4,14 @@
{% block content %}
{{ block('title') }}
-
-
- {# include vue_address component #}
- {% include '@ChillMain/Address/_insert_vue_address.html.twig' with {
- targetEntity: { name: 'household', id: household.id },
- backUrl: path('chill_person_household_addresses', { 'household_id': household.id }),
- openPanesInModal: false,
- stickyActions: true,
- useValidFrom: true,
- } %}
- {#
- #}
-
+
+ {# include vue_address component #}
+ {% include '@ChillMain/Address/_insert_vue_address.html.twig' with {
+ targetEntity: { name: 'household', id: household.id },
+ backUrl: path('chill_person_household_addresses', { 'household_id': household.id }),
+ openPanesInModal: false,
+ stickyActions: true,
+ useValidFrom: true,
+ } %}
{% 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 d159c7193..e78216f04 100644
--- a/src/Bundle/ChillPersonBundle/Resources/views/SocialWork/SocialAction/index.html.twig
+++ b/src/Bundle/ChillPersonBundle/Resources/views/SocialWork/SocialAction/index.html.twig
@@ -3,10 +3,10 @@
{% block admin_content %}
{% embed '@ChillMain/CRUD/_index.html.twig' %}
{% block table_entities_thead_tr %}
-
{{ 'Id'|trans }}
+
{{ 'Id' }}
{{ 'Title'|trans }}
{{ 'Social issue'|trans }}
-
{{ 'Ordering'|trans }}
+
{{ 'Order'|trans }}
{{ 'goal.desactivationDate'|trans }}
{% endblock %}
diff --git a/src/Bundle/ChillPersonBundle/Resources/views/Workflow/_accompanying_period_work.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/Workflow/_accompanying_period_work.html.twig
index 17ecb9072..49cd37180 100644
--- a/src/Bundle/ChillPersonBundle/Resources/views/Workflow/_accompanying_period_work.html.twig
+++ b/src/Bundle/ChillPersonBundle/Resources/views/Workflow/_accompanying_period_work.html.twig
@@ -3,13 +3,6 @@
{{ 'workflow.SocialAction deleted'|trans }}
{% else %}
-
- {% include '@ChillPerson/AccompanyingCourseWork/_item.html.twig' with {
- 'w': work,
- 'itemBlocClass': 'bg-chill-llight-gray'
- } %}
-
-
{% if display_action is defined and display_action == true %}
diff --git a/src/Bundle/ChillPersonBundle/Resources/views/Workflow/_evaluation.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/Workflow/_evaluation.html.twig
index 488f31661..ca95760dd 100644
--- a/src/Bundle/ChillPersonBundle/Resources/views/Workflow/_evaluation.html.twig
+++ b/src/Bundle/ChillPersonBundle/Resources/views/Workflow/_evaluation.html.twig
@@ -1,4 +1,4 @@
-
+
diff --git a/src/Bundle/ChillPersonBundle/Resources/views/Workflow/_evaluation_document.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/Workflow/_evaluation_document.html.twig
index 984277297..5ab93896a 100644
--- a/src/Bundle/ChillPersonBundle/Resources/views/Workflow/_evaluation_document.html.twig
+++ b/src/Bundle/ChillPersonBundle/Resources/views/Workflow/_evaluation_document.html.twig
@@ -5,7 +5,7 @@
{{ 'workflow.doc for evaluation deleted'|trans }}
{% else %}
-
+
{{ doc.title }}
diff --git a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml
index 65beed811..5178a042c 100644
--- a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml
+++ b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml
@@ -232,6 +232,8 @@ No resources: "Pas d'interlocuteurs privilégiés"
Persons associated: Personnes concernés
Referrer: Référent
Referrers: Agents traitants
+Referrer2: Agent traitant
+No referrer: Pas d'agent traitant
Some peoples does not belong to any household currently. Add them to an household soon: Certaines personnes n'appartiennent à aucun ménage actuellement. Renseignez leur ménage dès que possible.
Add to household now: Ajouter à un ménage
Any resource for this accompanying course: Aucun interlocuteur privilégié pour ce parcours
@@ -886,6 +888,7 @@ accompanying_course_work:
create: Créer une action
Create accompanying course work: Créer une action d'accompagnement
Edit accompanying course work: Modifier une action d'accompagnement
+ Show accompanying course work: Action d'accompagnement
List accompanying course work: Liste des actions d'accompagnement
action: Action
create_date: Date de création
diff --git a/src/Bundle/ChillTaskBundle/Resources/views/SingleTask/List/index_my_tasks.html.twig b/src/Bundle/ChillTaskBundle/Resources/views/SingleTask/List/index_my_tasks.html.twig
index 5d7e88542..359d02ef0 100644
--- a/src/Bundle/ChillTaskBundle/Resources/views/SingleTask/List/index_my_tasks.html.twig
+++ b/src/Bundle/ChillTaskBundle/Resources/views/SingleTask/List/index_my_tasks.html.twig
@@ -1,4 +1,4 @@
-{% extends 'ChillMainBundle::layout.html.twig' %}
+{% extends '@ChillMain/layout.html.twig' %}
{% block title 'My tasks'|trans %}
diff --git a/src/Bundle/ChillThirdPartyBundle/Menu/AdminMenuBuilder.php b/src/Bundle/ChillThirdPartyBundle/Menu/AdminMenuBuilder.php
index bc1e6ef08..75b6a0c64 100644
--- a/src/Bundle/ChillThirdPartyBundle/Menu/AdminMenuBuilder.php
+++ b/src/Bundle/ChillThirdPartyBundle/Menu/AdminMenuBuilder.php
@@ -39,7 +39,6 @@ class AdminMenuBuilder implements LocalMenuBuilderInterface
->setAttribute('class', 'list-group-item-header')
->setExtras([
'order' => 3000,
- 'icons' => ['male'],
]);
$menu->addChild('Third party category', [
diff --git a/src/Bundle/ChillWopiBundle/src/Resources/config/services.php b/src/Bundle/ChillWopiBundle/src/Resources/config/services.php
index 5f38ebb74..fc19e9c0d 100644
--- a/src/Bundle/ChillWopiBundle/src/Resources/config/services.php
+++ b/src/Bundle/ChillWopiBundle/src/Resources/config/services.php
@@ -49,8 +49,7 @@ return static function (ContainerConfigurator $container) {
$services
->set(ChillDocumentLockManager::class)
- ->decorate(DocumentLockManagerInterface::class)
- ;
+ ->decorate(DocumentLockManagerInterface::class);
$services
->set(AuthorizationManager::class);
diff --git a/src/Bundle/ChillWopiBundle/src/Service/Wopi/ChillDocumentLockManager.php b/src/Bundle/ChillWopiBundle/src/Service/Wopi/ChillDocumentLockManager.php
index 30388852b..fce25de58 100644
--- a/src/Bundle/ChillWopiBundle/src/Service/Wopi/ChillDocumentLockManager.php
+++ b/src/Bundle/ChillWopiBundle/src/Service/Wopi/ChillDocumentLockManager.php
@@ -21,7 +21,10 @@ class ChillDocumentLockManager implements DocumentLockManagerInterface
{
private const LOCK_DURATION = 60 * 30;
- private int $postDeleteLockDurationMs;
+ /**
+ * Number of seconds to keep the lock after the delete lock operation.
+ */
+ private const LOCK_GRACEFUL_DURATION_TIME = 3;
private ChillRedis $redis;
@@ -32,9 +35,13 @@ class ChillDocumentLockManager implements DocumentLockManagerInterface
public function deleteLock(Document $document, RequestInterface $request): bool
{
- $this->redis->del($this->getCacheId($document));
+ if (0 === $this->redis->exists($this->getCacheId($document))) {
+ return true;
+ }
- return true;
+ // some queries (ex.: putFile) may be executed on the same time than the unlock, so
+ // we add a delay before unlocking the file, instead of deleting it immediatly
+ return $this->redis->expire($this->getCacheId($document), self::LOCK_GRACEFUL_DURATION_TIME);
}
public function getLock(Document $document, RequestInterface $request): string
diff --git a/src/Bundle/ChillWopiBundle/src/Service/Wopi/ChillDocumentManager.php b/src/Bundle/ChillWopiBundle/src/Service/Wopi/ChillDocumentManager.php
index 8b6e3f846..19b4dc9b4 100644
--- a/src/Bundle/ChillWopiBundle/src/Service/Wopi/ChillDocumentManager.php
+++ b/src/Bundle/ChillWopiBundle/src/Service/Wopi/ChillDocumentManager.php
@@ -87,7 +87,9 @@ final class ChillDocumentManager implements DocumentManagerInterface
public function deleteLock(Document $document): void
{
- $this->documentLockManager->deleteLock($document, $this->request);
+ if (false === $this->documentLockManager->deleteLock($document, $this->request)) {
+ throw new RuntimeException('could not remove the lock');
+ }
}
/**