From fc2a2da75fe5fa4e59077861a2f67f120de50730 Mon Sep 17 00:00:00 2001 From: Mathieu Jaumotte Date: Tue, 25 May 2021 15:36:07 +0200 Subject: [PATCH] page blocs design --- .../Resources/public/scss/chillmain.scss | 13 ++- .../views/AccompanyingCourse/index.html.twig | 101 +++++++++++------- 2 files changed, 75 insertions(+), 39 deletions(-) diff --git a/src/Bundle/ChillMainBundle/Resources/public/scss/chillmain.scss b/src/Bundle/ChillMainBundle/Resources/public/scss/chillmain.scss index 145487a89..d24708fdb 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/scss/chillmain.scss +++ b/src/Bundle/ChillMainBundle/Resources/public/scss/chillmain.scss @@ -82,6 +82,7 @@ div.flex-bloc { border: 1px solid #000; margin: 0 1em 1em 0; padding: 1em; + padding-bottom: 0; flex-grow: 0; flex-shrink: 0; flex-basis: 30%; @@ -94,15 +95,23 @@ div.flex-bloc { } .content-bloc { margin: 0; - font-size: 90%; + font-size: 80%; } - dl { + dd { + margin: 0.67em auto; } ul.record_actions { margin-top: auto; margin-bottom: 0; } } + @media only screen and (max-width: 1024px) { + div.item-bloc { + flex-grow: 0; + flex-shrink: 0; + flex-basis: 45%; + } + } @media only screen and (max-width: 768px) { flex-direction: column; } diff --git a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/index.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/index.html.twig index 563f57b25..937fb2e0a 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/index.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/index.html.twig @@ -28,16 +28,18 @@
- {{ p.person.gender == 'woman' ? 'F' : 'M' }} -
-
- {{ 'né le ' ~ p.person.birthdate|format_date('short') }} + {% set born = (p.person.gender == 'woman') ? 'née': 'né' %} + {% set gender = (p.person.gender == 'woman') ? 'fa-venus' : + (p.person.gender == 'man') ? 'fa-mars' : 'fa-neuter' %} + {% set genderTitle = (p.person.gender == 'woman') ? 'femme' : + (p.person.gender == 'homme') ? 'fa-mars' : 'neutre' %} + {{ born ~ ' le ' ~ p.person.birthdate|format_date('short') }}
{% if p.person.mobilenumber %} -
{{ p.person.mobilenumber }} + {{ p.person.mobilenumber }} {% else %} -
+ {% if p.person.phonenumber %} {{ p.person.phonenumber }} {% else %} @@ -68,62 +70,87 @@

{{ 'Resources'|trans }}

- +
{% for r in accompanyingCourse.resources %} +
{% if r.person %} +
{{ r.person.firstname ~ ' ' ~ r.person.lastname }} {{ 'Usager' }}
- {{ r.person.gender == 'woman' ? 'F' : 'M' }}
- {{ 'né le ' ~ r.person.birthdate|format_date('short') }}
- - {% if r.person.mobilenumber %} - {{ r.person.mobilenumber }} - {% else %} - - {% if r.person.phonenumber %} - {{ r.person.phonenumber }} - {% else %} - {{ 'No data given'|trans }} - {% endif %} - {% endif %}
- - {%- if r.person.lastAddress is not empty -%} - {{ address._render(r.person.lastAddress, {'has_no_address': true, 'with_valid_from': false, 'with_icon': true}) }} - {%- else -%} - - {{ 'No address given'|trans }} - {%- endif -%} +
+ +
+ {% set born = (r.person.gender == 'woman') ? 'née': 'né' %} + {% set gender = (r.person.gender == 'woman') ? 'fa-venus' : + (r.person.gender == 'man') ? 'fa-mars' : 'fa-neuter' %} + {% set genderTitle = (r.person.gender == 'woman') ? 'femme' : + (r.person.gender == 'mhomme') ? 'fa-mars' : 'neutre' %} + {{ born ~ ' le ' ~ r.person.birthdate|format_date('short') }} +
+
+ {% if r.person.mobilenumber %} + {{ r.person.mobilenumber }} + {% else %} + + {% if r.person.phonenumber %} + {{ r.person.phonenumber }} + {% else %} + {{ 'No data given'|trans }} + {% endif %} + {% endif %} +
+
+ {%- if r.person.lastAddress is not empty -%} + {{ address._render(r.person.lastAddress, {'has_no_address': true, 'with_valid_from': false, 'with_icon': true}) }} + {%- else -%} + + {{ 'No address given'|trans }} + {%- endif -%} +
+
+ {% endif %} - {% if r.thirdParty %} +
{{ r.thirdParty.name }} {{ 'Tiers' }}
- {{ r.thirdParty.telephone|chill_print_or_message("thirdparty.No_phonenumber") }}
- {{ r.thirdParty.email|chill_print_or_message("thirdparty.No_email") }}
- - {% if r.thirdParty.address == null %} - {{ 'No address given'|trans }} - {% else %} - {{ address._render(r.thirdParty.address, {'with_valid_from': false, 'with_icon': true }) }} - {% endif %} - +
+ +
+ {{ r.thirdParty.telephone|chill_print_or_message("thirdparty.No_phonenumber") }} +
+
+ {{ r.thirdParty.email|chill_print_or_message("thirdparty.No_email") }} +
+
+ {% if r.thirdParty.address == null %} + {{ 'No address given'|trans }} + {% else %} + {{ address._render(r.thirdParty.address, {'with_valid_from': false, 'with_icon': true }) }} + {% endif %} +
+ +
+ {% endif %} +
{% endfor %} +

{{ 'Social actions'|trans }}