diff --git a/.env b/.env
deleted file mode 100644
index 619f471ca..000000000
--- a/.env
+++ /dev/null
@@ -1,64 +0,0 @@
-##
-## Manually dump .env files in .env.local.php with
-## `$ composer symfony:dump-env prod`
-##
-
-## Project environment
-APP_ENV=dev
-
-## Enable debug
-APP_DEBUG=true
-
-## Locale
-LOCALE=fr
-
-## Framework secret
-APP_SECRET=ThisTokenIsNotSoSecretChangeIt
-
-## Symfony/swiftmailer
-MAILER_TRANSPORT=smtp
-MAILER_HOST=smtp
-MAILER_PORT=1025
-MAILER_CRYPT=
-MAILER_AUTH=
-MAILER_USER=
-MAILER_PASSWORD=
-MAILER_URL=${MAILER_TRANSPORT}://${MAILER_HOST}:${MAILER_PORT}?encryption=${MAILER_CRYPT}&auth_mode=${MAILER_AUTH}&username=${MAILER_USER}&password=${MAILER_PASSWORD}
-
-## Notifications
-NOTIFICATION_HOST=localhost:8001
-NOTIFICATION_FROM_EMAIL=admin@chill.social
-NOTIFICATION_FROM_NAME=Chill
-
-## Gelf
-GELF_HOST=gelf
-GELF_PORT=12201
-
-## OVH OpenStack Storage User/Role
-OS_USERNAME=
-OS_PASSWORD=
-OS_TENANT_ID=
-OS_REGION_NAME=GRA
-OS_AUTH_URL=https://auth.cloud.ovh.net/v2.0/
-
-## OVH OpenStack Storage Container
-ASYNC_UPLOAD_TEMP_URL_KEY=
-ASYNC_UPLOAD_TEMP_URL_BASE_PATH=
-ASYNC_UPLOAD_TEMP_URL_CONTAINER=
-
-## Redis Cache
-REDIS_HOST=redis
-REDIS_PORT=6379
-REDIS_URL=redis://${REDIS_HOST}:${REDIS_PORT}
-
-## Twilio
-TWILIO_SID=~
-TWILIO_SECRET=~
-
-## DOCKER IMAGES REGISTRY
-#IMAGE_PHP=
-#IMAGE_NGINX=
-
-## DOCKER IMAGES VERSION
-#VERSION=test
-VERSION=prod
diff --git a/CHANGELOG.md b/CHANGELOG.md
index fcf514de1..27d5e0bf1 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -14,11 +14,23 @@ and this project adheres to
[activity] correct associated persons by considering only open participations (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/476)
+
+## Test releases
+
+### test release 2022-02-14
+
+* AddPersons: remove ul-li html tags from AddPersons (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/419)
+* [doc-generator] do not set required fields for mainPerson, person1, person2 (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement#456)
+* [doc-generation] add age and obele in the mainPerson, person1 and person2 list + add obele in person renderString if addAge (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/370)
+* [person] accompanying course work: fix on-the-fly update of thirdParty
+* fix normalisation of accompanying course requestor api (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/378)
* [person] add a returnPath when clicking on some Person or ThirdParty badge (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/427)
* [person] accompanying course work: fix on-the-fly update of thirdParty
* [on-the-fly] close modal only after validation
* [person] correct thirdparty PATCH url + add email and altnames in AddPerson and serializer (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/433)
* change order for accompanying course work list
+* [parcours]: Mes parcours brouillon added to user menu (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/440)
+* [Documents]: List view adapted to display more information (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/414)
* [person]: style fix in parcours listing per person. (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/432)
* [household]: display address of current household (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/415)
* ajoute un ordre dans les localisation (api)
@@ -27,8 +39,9 @@ and this project adheres to
* [person]: create person and household added to button dropdown (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/454)
* display full address in address.text in normalization. Adapt AddressRenderBox
* [address]: Correction residential address 'depuis le' (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/459)
-
-## Test releases
+* [Documents]: List view adapted to display more information (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/414)
+* [Thirdparty_contact]: address blurred if confidential in view page (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/450)
+* [homepage_widget]: If no sender then display as 'notification automatique' (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/435)
### test release 2021-02-01
diff --git a/phpstan-deprecations.neon b/phpstan-deprecations.neon
index b41a746b9..7489d4d80 100644
--- a/phpstan-deprecations.neon
+++ b/phpstan-deprecations.neon
@@ -408,24 +408,6 @@ parameters:
count: 1
path: src/Bundle/ChillCustomFieldsBundle/Form/CustomFieldsGroupType.php
- -
- message:
- """
- #^Call to deprecated method getReachableScopes\\(\\) of class Chill\\\\MainBundle\\\\Security\\\\Authorization\\\\AuthorizationHelper\\:
- Use getReachableCircles$#
- """
- count: 1
- path: src/Bundle/ChillDocStoreBundle/Controller/DocumentPersonController.php
-
- -
- message:
- """
- #^Parameter \\$translator of method Chill\\\\DocStoreBundle\\\\Controller\\\\DocumentPersonController\\:\\:__construct\\(\\) has typehint with deprecated interface Symfony\\\\Component\\\\Translation\\\\TranslatorInterface\\:
- since Symfony 4\\.2, use Symfony\\\\Contracts\\\\Translation\\\\TranslatorInterface instead$#
- """
- count: 1
- path: src/Bundle/ChillDocStoreBundle/Controller/DocumentPersonController.php
-
-
message:
"""
diff --git a/src/Bundle/ChillActivityBundle/Resources/public/vuejs/Activity/components/ConcernedGroups.vue b/src/Bundle/ChillActivityBundle/Resources/public/vuejs/Activity/components/ConcernedGroups.vue
index 45483dc95..7ec62d07d 100644
--- a/src/Bundle/ChillActivityBundle/Resources/public/vuejs/Activity/components/ConcernedGroups.vue
+++ b/src/Bundle/ChillActivityBundle/Resources/public/vuejs/Activity/components/ConcernedGroups.vue
@@ -19,14 +19,18 @@
-
-
+
@@ -9,8 +10,10 @@
{{ document.title }}
+ {{ mm.mimeIcon(document.object.type) }}
+
{% if document.description is not empty %}
-
+
{{ document.description }}
{% endif %}
@@ -42,26 +45,14 @@
{{ m.download_button(document.object, document.title) }}
- {% if not freezed %}
- {% set button = {
- 'changeIcon': 'fa-unlock',
- } %}{#
- 'changeClass' string
- 'noText' boolean
- #}
- {# vue component
- #}
- {{ 'Edit'|trans }}
- {% else %}
-
- {{ 'Update document'|trans }}
-
+ {% if chill_document_is_editable(document.object) %}
+ {% if not freezed %}
+ {{ document.object|chill_document_edit_button({'title': document.title|e('html') }) }}
+ {% else %}
+
+ {{ 'Update document'|trans }}
+
+ {% endif %}
{% endif %}
{% if is_granted('CHILL_ACCOMPANYING_COURSE_DOCUMENT_SEE', document) and document.course != null %}
diff --git a/src/Bundle/ChillDocStoreBundle/Resources/views/AccompanyingCourseDocument/edit.html.twig b/src/Bundle/ChillDocStoreBundle/Resources/views/AccompanyingCourseDocument/edit.html.twig
index e28611701..d7a5325cf 100644
--- a/src/Bundle/ChillDocStoreBundle/Resources/views/AccompanyingCourseDocument/edit.html.twig
+++ b/src/Bundle/ChillDocStoreBundle/Resources/views/AccompanyingCourseDocument/edit.html.twig
@@ -19,7 +19,7 @@
{{ form_row(form.description) }}
{{ form_row(form.object, { 'label': 'Document', 'existing': document.object }) }}
-
{% endblock %}
diff --git a/src/Bundle/ChillDocStoreBundle/Resources/views/AccompanyingCourseDocument/show.html.twig b/src/Bundle/ChillDocStoreBundle/Resources/views/AccompanyingCourseDocument/show.html.twig
index 610b5249b..1e4fdb8e6 100644
--- a/src/Bundle/ChillDocStoreBundle/Resources/views/AccompanyingCourseDocument/show.html.twig
+++ b/src/Bundle/ChillDocStoreBundle/Resources/views/AccompanyingCourseDocument/show.html.twig
@@ -3,6 +3,7 @@
{% set activeRouteKey = '' %}
{% import "@ChillDocStore/Macro/macro.html.twig" as m %}
+{% import "@ChillDocStore/Macro/macro_mimeicon.html.twig" as mm %}
{% block title %}
{# {{ 'Detail of document of %name%'|trans({ '%name%': accompanyingCourse|chill_entity_render_string } ) }} #}
@@ -18,16 +19,18 @@
{% block content %}
{{ block('title') }}
-
-
+
+ {{ mm.mimeIcon(document.object.type) }}
+
+
- {{ 'Title'|trans }}
- {{ document.title }}
-
+
{% if document.category is not null %}
- {{ 'Category'|trans }}
- {{ document.category.name|localize_translatable_string }}
{% endif %}
-
+
- {{ 'Description' | trans }}
-
{% if document.description is empty %}
@@ -39,7 +42,7 @@
{% endif %}
-
+
{% endblock %}
-
+
{% block block_post_menu %}
{% endblock %}
@@ -74,4 +81,4 @@
{{ parent() }}
{{ encore_entry_script_tags('mod_async_upload') }}
{{ encore_entry_script_tags('mod_entity_workflow_pick') }}
-{% endblock %}
\ No newline at end of file
+{% endblock %}
diff --git a/src/Bundle/ChillDocStoreBundle/Resources/views/Button/wopi_edit_document.html.twig b/src/Bundle/ChillDocStoreBundle/Resources/views/Button/wopi_edit_document.html.twig
new file mode 100644
index 000000000..f25c06030
--- /dev/null
+++ b/src/Bundle/ChillDocStoreBundle/Resources/views/Button/wopi_edit_document.html.twig
@@ -0,0 +1,9 @@
+
+{# Twig way
+ TODO: une route, un template avec un header CHILL et un iframe
+#}
+
+ {{ 'online_edit_document'|trans }}
+
+
diff --git a/src/Bundle/ChillDocStoreBundle/Resources/views/List/list_item.html.twig b/src/Bundle/ChillDocStoreBundle/Resources/views/List/list_item.html.twig
new file mode 100644
index 000000000..358127bfb
--- /dev/null
+++ b/src/Bundle/ChillDocStoreBundle/Resources/views/List/list_item.html.twig
@@ -0,0 +1,83 @@
+{% import "@ChillDocStore/Macro/macro.html.twig" as m %}
+{% import "@ChillDocStore/Macro/macro_mimeicon.html.twig" as mm %}
+
+
+
+
+ {{ document.title }}
+
+
+ {{ mm.mimeIcon(document.object.type) }}
+
+
+
{{ document.category.name|localize_translatable_string }}
+
+ {% if document.template is not null %}
+
+
{{ document.template.name.fr }}
+
+ {% endif %}
+
+
+
+
+ {% if document.date is not null %}
+
+ {{ document.createdAt|format_date('short') }}
+
+ {% endif %}
+
+
+
+ {% if document.description is not empty %}
+
+
+ {{ document.description|chill_markdown_to_html }}
+
+
+ {% endif %}
+
+
+ {% if document.course is defined %}
+
+ {% if is_granted('CHILL_ACCOMPANYING_COURSE_DOCUMENT_SEE_DETAILS', document) %}
+ -
+ {{ m.download_button(document.object, document.title) }}
+
+ -
+
+
+ {% endif %}
+ {% if is_granted('CHILL_ACCOMPANYING_COURSE_DOCUMENT_UPDATE', document) %}
+ -
+
+
+ {% endif %}
+
+ {% else %}
+
+ {% if is_granted('CHILL_PERSON_DOCUMENT_SEE_DETAILS', document) %}
+ -
+ {{ m.download_button(document.object, document.title) }}
+
+ -
+
+
+ {% endif %}
+ {% if is_granted('CHILL_PERSON_DOCUMENT_UPDATE', document) %}
+ -
+
+
+ {% endif %}
+
+ {% endif %}
+
+
diff --git a/src/Bundle/ChillDocStoreBundle/Resources/views/Macro/macro_mimeicon.html.twig b/src/Bundle/ChillDocStoreBundle/Resources/views/Macro/macro_mimeicon.html.twig
new file mode 100644
index 000000000..a9bc07e2f
--- /dev/null
+++ b/src/Bundle/ChillDocStoreBundle/Resources/views/Macro/macro_mimeicon.html.twig
@@ -0,0 +1,55 @@
+{% macro mimeIcon(type) %}
+
+ {# mapping
+ forkawesome and mime type https://gist.github.com/colemanw/9c9a12aae16a4bfe2678de86b661d922
+ #}
+ {% set mapmime = {
+ 'image': 'fa-file-image-o',
+ 'audio': 'fa-file-audio-o',
+ 'video': 'fa-file-video-o',
+ 'application/pdf': 'fa-file-pdf-o',
+ 'application/msword': 'fa-file-word-o',
+ 'application/vnd.ms-word': 'fa-file-word-o',
+ 'application/vnd.oasis.opendocument.text': 'fa-file-word-o',
+ 'application/vnd.openxmlformats-officedocument.wordprocessingml': 'fa-file-word-o',
+ 'application/vnd.ms-excel': 'fa-file-excel-o',
+ 'application/vnd.openxmlformats-officedocument.spreadsheetml': 'fa-file-excel-o',
+ 'application/vnd.oasis.opendocument.spreadsheet': 'fa-file-excel-o',
+ 'application/vnd.ms-powerpoint': 'fa-file-powerpoint-o',
+ 'application/vnd.openxmlformats-officedocument.presentationml': 'fa-file-powerpoint-o',
+ 'application/vnd.oasis.opendocument.presentation': 'fa-file-powerpoint-o',
+ 'text/plain': 'fa-file-text-o',
+ 'text/html': 'fa-file-code-o',
+ 'application/json': 'fa-file-code-o',
+ 'application/gzip': 'fa-file-archive-o',
+ 'application/zip': 'fa-file-archive-o',
+ } %}
+
+ {% set icon = 'fa-file-o' %}
+ {% for key,val in mapmime %}
+ {% if type starts with key %}
+ {% set icon = val %}
+ {% endif %}
+ {% endfor %}
+
+ {# TODO improve mapping
+ mime type and friendly name https://gist.github.com/rosskmurphy/3724501
+ #}
+ {% set maptype = {
+ 'fa-file-word-o': 'office document/texte',
+ 'fa-file-excel-o': 'office document/tableur',
+ 'fa-file-powerpoint-o': 'office document/presentation',
+ } %}
+
+ {% set label = type %}
+ {% for key, val in maptype %}
+ {% if icon == key %}
+ {% set label = val %}
+ {% endif %}
+ {% endfor %}
+
+
+
+ {{ label|capitalize }}
+
+{% endmacro %}
\ No newline at end of file
diff --git a/src/Bundle/ChillDocStoreBundle/Resources/views/PersonDocument/edit.html.twig b/src/Bundle/ChillDocStoreBundle/Resources/views/PersonDocument/edit.html.twig
index bf3dcd407..7533f1120 100644
--- a/src/Bundle/ChillDocStoreBundle/Resources/views/PersonDocument/edit.html.twig
+++ b/src/Bundle/ChillDocStoreBundle/Resources/views/PersonDocument/edit.html.twig
@@ -30,7 +30,9 @@
{{ form_row(form.title) }}
{{ form_row(form.date) }}
{{ form_row(form.category) }}
- {{ form_row(form.scope) }}
+ {% if form.scope is defined %}
+ {{ form_row(form.scope) }}
+ {% endif %}
{{ form_row(form.description) }}
{{ form_row(form.object, { 'label': 'Document', 'existing': document.object }) }}
diff --git a/src/Bundle/ChillDocStoreBundle/Resources/views/PersonDocument/index.html.twig b/src/Bundle/ChillDocStoreBundle/Resources/views/PersonDocument/index.html.twig
index 40c85002e..b3d2baab6 100644
--- a/src/Bundle/ChillDocStoreBundle/Resources/views/PersonDocument/index.html.twig
+++ b/src/Bundle/ChillDocStoreBundle/Resources/views/PersonDocument/index.html.twig
@@ -30,54 +30,24 @@
{% endblock %}
{% block personcontent %}
+
+
{{ 'Documents for %name%'|trans({ '%name%': person|chill_entity_render_string } ) }}
-
-
-
-
- {{ 'Title' | trans }} |
- {{ 'Category'|trans }} |
- {{ 'Circle' | trans }} |
- {{ 'Actions' | trans }} |
-
-
-
+ {% if documents|length == 0 %}
+ {{ 'No documents'|trans }}
+ {% else %}
+
{% for document in documents %}
-
- {{ document.title }} |
- {{ document.category.name|localize_translatable_string }} |
- {{ document.scope.name|localize_translatable_string }} |
-
-
- {% if is_granted('CHILL_PERSON_DOCUMENT_SEE_DETAILS', document) %}
- -
- {{ m.download_button(document.object, document.title) }}
-
- -
-
-
- {% endif %}
- {% if is_granted('CHILL_PERSON_DOCUMENT_UPDATE', document) %}
- -
-
-
- {% endif %}
-
- |
-
- {% else %}
-
-
- {{ 'Any document found'|trans }}
- |
-
+ {% include 'ChillDocStoreBundle:List:list_item.html.twig' %}
{% endfor %}
-
-
+
+ {% endif %}
+
+ {{ chill_pagination(pagination) }}
{% if is_granted('CHILL_PERSON_DOCUMENT_CREATE', person) %}
-
{% endblock %}
diff --git a/src/Bundle/ChillDocStoreBundle/Resources/views/PersonDocument/show.html.twig b/src/Bundle/ChillDocStoreBundle/Resources/views/PersonDocument/show.html.twig
index f22864645..723757425 100644
--- a/src/Bundle/ChillDocStoreBundle/Resources/views/PersonDocument/show.html.twig
+++ b/src/Bundle/ChillDocStoreBundle/Resources/views/PersonDocument/show.html.twig
@@ -19,6 +19,7 @@
{% set activeRouteKey = '' %}
{% import "@ChillDocStore/Macro/macro.html.twig" as m %}
+{% import "@ChillDocStore/Macro/macro_mimeicon.html.twig" as mm %}
{% block title %}{{ 'Detail of document of %name%'|trans({ '%name%': person|chill_entity_render_string } ) }}{% endblock %}
@@ -29,12 +30,16 @@
{% block personcontent %}