From 2cda6ceebf7013fb6300c994512336d719def277 Mon Sep 17 00:00:00 2001 From: Mathieu Jaumotte Date: Thu, 24 Jun 2021 15:43:02 +0200 Subject: [PATCH] improve history details --- .../Resources/public/sass/chillperson.scss | 14 ++- .../Resources/views/Address/list.html.twig | 4 +- .../views/Household/addresses.html.twig | 94 ++++++++++--------- 3 files changed, 56 insertions(+), 56 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Resources/public/sass/chillperson.scss b/src/Bundle/ChillPersonBundle/Resources/public/sass/chillperson.scss index 862ddef91..55546c56e 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/sass/chillperson.scss +++ b/src/Bundle/ChillPersonBundle/Resources/public/sass/chillperson.scss @@ -134,7 +134,7 @@ div#header-household-details { * ADDRESS HISTORY * context person / household */ -div.timeline.grid { +div.address-timeline.grid { display: grid; grid-template-rows: auto auto auto; grid-template-columns: auto 120px auto; @@ -180,13 +180,11 @@ div.timeline.grid { padding: 1em; } div.content { - box-shadow: - 1px 0 0 0 #000, - 0 1px 0 0 #000, - 1px 1px 0 0 #000, - 1px 0 0 0 #000 inset, - 0 1px 0 0 #000 inset; - + margin: 0.3em; + border: 1px dashed #00000045; + &.row1 { // current address + border: 1px solid #000; + } div.address { font-variant: small-caps; } diff --git a/src/Bundle/ChillPersonBundle/Resources/views/Address/list.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/Address/list.html.twig index 18fd85e86..638d38b36 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/Address/list.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/Address/list.html.twig @@ -26,7 +26,7 @@

{{ 'Addresses\'history for %name%'|trans({ '%name%': person.firstName ~ ' ' ~ person.lastName } ) }}

-
+
{% if person.addresses|length == 0 %} {{ 'No address given'|trans }} @@ -74,7 +74,7 @@ {# if household address #}{#
-
+
...
#}{# endif #} diff --git a/src/Bundle/ChillPersonBundle/Resources/views/Household/addresses.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/Household/addresses.html.twig index ee05b70f0..1e029c9a2 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/Household/addresses.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/Household/addresses.html.twig @@ -5,63 +5,65 @@ {% block content %}

{{ block('title') }}

-
- - +
+ {% if household.addresses|length == 0 %} + {{ 'No address given'|trans }} + {% else %} +
+ {% endif %} + {% for address in household.addresses %} -
-
-
-
- {% if address.validFrom is not empty %} - {{ address.validFrom|format_date('long') }} - {% endif %} -
-
-
-
-
- -
- {% if address.isNoAddress == true %} + +
+ +
+
+ {% if address.isNoAddress == true %}
{{ 'address.consider homeless'|trans }}
- {% else %} -
- {% if address.street is not empty %} -
- - {{ address.street }} - {% if address.streetNumber is not empty %} - , {{ address.streetNumber }} - {% endif %} -
+ {% else %} + {% if address.street is not empty %} +
+ {{ address.street }} + {% if address.streetNumber is not empty %} + , {{ address.streetNumber }} {% endif %} - {% if address.postCode is not empty %} +
+ {% endif %} + {% if address.postCode is not empty %}
{{ address.postCode.code }} {{ address.postCode.name }} ({{ address.postCode.country.name|localize_translatable_string }})
- {% endif %} - -
{% endif %} - -
+ + {% endif %}
+ +
    +
  • + +
  • +
-
- + +
+ {% if address.validFrom is not empty %} + {{ address.validFrom|format_date('long') }} + {% endif %} +
+ {% endfor %} +
+ + + {% endblock %}