From aa40716898a4ec418c1d399dd113b066f8ba07c9 Mon Sep 17 00:00:00 2001 From: Mathieu Jaumotte Date: Sun, 21 Mar 2021 14:36:59 +0100 Subject: [PATCH] design UX for duplicate person feature --- .../Form/PersonFindManuallyDuplicateType.php | 9 +- .../views/PersonDuplicate/_sidepane.html.twig | 45 ++++++++++ .../views/PersonDuplicate/confirm.html.twig | 84 ++++++++++++++++--- .../PersonDuplicate/find_manually.html.twig | 9 +- .../views/PersonDuplicate/view.html.twig | 52 +++++++++--- .../translations/messages.fr.yml | 18 +++- 6 files changed, 181 insertions(+), 36 deletions(-) create mode 100644 src/Bundle/ChillPersonBundle/Resources/views/PersonDuplicate/_sidepane.html.twig diff --git a/src/Bundle/ChillPersonBundle/Form/PersonFindManuallyDuplicateType.php b/src/Bundle/ChillPersonBundle/Form/PersonFindManuallyDuplicateType.php index 0a91e8fc6..c46f2cf82 100644 --- a/src/Bundle/ChillPersonBundle/Form/PersonFindManuallyDuplicateType.php +++ b/src/Bundle/ChillPersonBundle/Form/PersonFindManuallyDuplicateType.php @@ -5,7 +5,7 @@ namespace Chill\PersonBundle\Form; use Chill\PersonBundle\Form\Type\PickPersonType; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\Extension\Core\Type\CheckboxType; -use Symfony\Component\Form\Extension\Core\Type\ChoiceType; +use Symfony\Component\Form\Extension\Core\Type\HiddenType; use Symfony\Component\Form\FormBuilderInterface; class PersonFindManuallyDuplicateType extends AbstractType @@ -21,11 +21,8 @@ class PersonFindManuallyDuplicateType extends AbstractType 'label' => 'Find duplicate', 'mapped' => false, ]) - ->add('direction', ChoiceType::class, [ - 'choices' => [ - 'Starting' => 'starting', - 'Arrival' => 'arrival', - ], + ->add('direction', HiddenType::class, [ + 'data' => 'starting', ]) ; } diff --git a/src/Bundle/ChillPersonBundle/Resources/views/PersonDuplicate/_sidepane.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/PersonDuplicate/_sidepane.html.twig new file mode 100644 index 000000000..dfd931761 --- /dev/null +++ b/src/Bundle/ChillPersonBundle/Resources/views/PersonDuplicate/_sidepane.html.twig @@ -0,0 +1,45 @@ +{%- macro details(person, options) -%} + +{% import '@ChillMain/Address/macro.html.twig' as address %} + + +{% endmacro %} + +{%- macro links(person, options) -%} + +{% endmacro %} \ No newline at end of file diff --git a/src/Bundle/ChillPersonBundle/Resources/views/PersonDuplicate/confirm.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/PersonDuplicate/confirm.html.twig index 56b1a6837..dedf73d55 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/PersonDuplicate/confirm.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/PersonDuplicate/confirm.html.twig @@ -1,31 +1,94 @@ -{% extends "@ChillPerson/layout.html.twig" %} +{% extends "@ChillMain/layout.html.twig" %} {% set activeRouteKey = 'chill_person_duplicate' %} +{% import '@ChillPerson/PersonDuplicate/_sidepane.html.twig' as sidepane %} {% block title %}{{ 'Person duplicate'|trans|capitalize ~ ' ' ~ person.firstName|capitalize ~ ' ' ~ person.lastName }}{% endblock %} -{% block personcontent %} -

{{ 'Old person'|trans }}

- {{ person2 }} - +{% block content %} + +
+ +

{{ 'Merge duplicate persons folders'|trans }}

+ +
+

{{ 'Old person'|trans }}: + {{ 'Old person explain'|trans }} +

+
+ +

+ {{ person2 }} +

+ +

{{ 'Deleted datas'|trans ~ ':' }}

+ {{ sidepane.details(person2) }} + +

{{ 'Moved datas'|trans ~ ':' }}

+ {{ sidepane.links(person2) }} +
+
+ +
+

{{ 'New person'|trans }}: + {{ 'New person explain'|trans }} +

+
+ +

+ {{ person }} +

+ +

{{ 'Keeped datas'|trans ~ ':' }}

+ {{ sidepane.details(person) }} + +

{{ 'Keeped datas'|trans ~ ':' }}

+ {{ sidepane.links(person) }} +
+
{{ form_start(form) }} - {{ form_rest(form) }} +
-
    +
    +
    + {{ form_widget(form.confirm) }} +
    +
    + {{ form_label(form.confirm) }} +
    +
    +
+ +
{% endblock %} diff --git a/src/Bundle/ChillPersonBundle/Resources/views/PersonDuplicate/find_manually.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/PersonDuplicate/find_manually.html.twig index 267442740..f8f80bd56 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/PersonDuplicate/find_manually.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/PersonDuplicate/find_manually.html.twig @@ -8,19 +8,20 @@ {% block personcontent %} +

Désigner un dossier doublon

+ {{ form_start(form) }} - {{ form_rest(form) }} -