diff --git a/src/Bundle/ChillMainBundle/Resources/public/chill/scss/flex_table.scss b/src/Bundle/ChillMainBundle/Resources/public/chill/scss/flex_table.scss index 3e6cc1fc1..c01ebc41d 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/chill/scss/flex_table.scss +++ b/src/Bundle/ChillMainBundle/Resources/public/chill/scss/flex_table.scss @@ -40,6 +40,9 @@ div.flex-bloc { div.item-col { &:first-child { flex-grow: 0; flex-shrink: 0; flex-basis: auto; + padding-bottom: 0.5em; + border-bottom: 1px dotted #0000004f; + margin-bottom: 0.5em; } &:last-child { flex-grow: 1; flex-shrink: 1; flex-basis: auto; 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 986adaa97..2afd59fcb 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/chill/scss/render_box.scss +++ b/src/Bundle/ChillMainBundle/Resources/public/chill/scss/render_box.scss @@ -83,7 +83,9 @@ section.chill-entity { } } - .noaddress {} + .noaddress { + font-style: italic; + } span.address-since, span.address-until {} diff --git a/src/Bundle/ChillPersonBundle/Resources/public/chill/chillperson.scss b/src/Bundle/ChillPersonBundle/Resources/public/chill/chillperson.scss index 5b747da62..dace93340 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/chill/chillperson.scss +++ b/src/Bundle/ChillPersonBundle/Resources/public/chill/chillperson.scss @@ -159,85 +159,4 @@ div.household-members { } } -/* -* ADDRESS HISTORY -* context person / household -*/ -div.address-timeline.grid { - display: grid; - grid-template-rows: auto auto auto; - grid-template-columns: auto 120px auto; - @media only screen and (max-width: 750px) { - grid-template-columns: auto 1em auto; - } - - div.top { - grid-column: 2; - text-align: center; - color: lightgrey; - margin-bottom: -20px; - } - div.col-a { - grid-column: 1; - text-align: right; - } - div.col-b, - div.date { - grid-column: 2; - position: relative; - &:after { - position: absolute; - content: ''; - top: 0; bottom: 0; - left: 50%; - margin: auto -5px; - width: 10px; - height: 100%; - background-color: lightgrey; - z-index: -5; - } - } - div.col-c { - grid-column: 3; - } - - div.col-b, - div.action, - div.content { - min-height: 30px; - padding: 1em; - } - div.content { - margin: 0.3em; - border: 1px dashed #00000045; - &.row1 { // current address - border: 1px solid #000; - } - div.address { - font-variant: small-caps; - } - } - div.date { - text-align: center; - background-color: lightgrey; - padding: 0.5em; - border-radius: 0.3em; - } - - div.span2 { grid-row: span 3; } - div.span3 { grid-row: span 5; } - div.span4 { grid-row: span 7; } - div.span5 { grid-row: span 9; } - - ul.record_actions { - margin: 0; - } - .fake { - &:after { - content: 'fake, just to test.. '; - color: lightgrey; - font-style: italic; - } - } -} diff --git a/src/Bundle/ChillPersonBundle/Resources/public/chill/index.js b/src/Bundle/ChillPersonBundle/Resources/public/chill/index.js index 69e589bab..0e38c7d18 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/chill/index.js +++ b/src/Bundle/ChillPersonBundle/Resources/public/chill/index.js @@ -8,6 +8,7 @@ require('./scss/household_banner.scss'); require('./scss/accompanying_period_work.scss'); require('./scss/person_by_phonenumber.scss'); require('./scss/render_box.scss'); +require('./scss/address_history.scss'); require('./svg/phone-alt-solid.svg'); require('./svg/mobile-alt-solid.svg'); diff --git a/src/Bundle/ChillPersonBundle/Resources/public/chill/scss/address_history.scss b/src/Bundle/ChillPersonBundle/Resources/public/chill/scss/address_history.scss new file mode 100644 index 000000000..e212db4cd --- /dev/null +++ b/src/Bundle/ChillPersonBundle/Resources/public/chill/scss/address_history.scss @@ -0,0 +1,88 @@ +/* +* ADDRESS HISTORY +* context person / household +*/ +div.address-timeline.grid { + display: grid; + grid-template-rows: auto auto auto; + grid-template-columns: auto 120px auto; + + div.household-address & { + // no col-a in this context ! + grid-template-columns: 0 120px auto; + } + + @media only screen and (max-width: 750px) { + grid-template-columns: auto 1em auto; + } + + div.top { + grid-column: 2; + text-align: center; + color: lightgrey; + margin-bottom: -20px; + } + div.col-a { + grid-column: 1; + text-align: right; + } + div.col-b, + div.date { + grid-column: 2; + position: relative; + &:after { + position: absolute; + content: ''; + top: 0; bottom: 0; + left: 50%; + margin: auto -5px; + width: 10px; + height: 100%; + background-color: lightgrey; + z-index: -5; + } + } + div.col-c { + grid-column: 3; + } + + div.col-b, + div.action, + div.content { + min-height: 30px; + padding: 1em; + } + div.content { + margin: 0.3em; + border: 1px dashed #00000045; + &.row1 { // current address + border: 1px solid #000; + } + div.address { + font-variant: small-caps; + } + } + div.date { + text-align: center; + background-color: lightgrey; + padding: 0.5em; + border-radius: 0.3em; + } + + div.span2 { grid-row: span 3; } + div.span3 { grid-row: span 5; } + div.span4 { grid-row: span 7; } + div.span5 { grid-row: span 9; } + + ul.record_actions { + margin: 0; + } + .fake { + &:after { + content: 'fake, just to test.. '; + color: lightgrey; + font-style: italic; + } + } +} + diff --git a/src/Bundle/ChillPersonBundle/Resources/views/Address/list.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/Address/list.html.twig index 80f68a84e..60de27e37 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/Address/list.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/Address/list.html.twig @@ -21,10 +21,19 @@ {% block title %}{{ 'Addresses history for %name%'|trans({ '%name%': person.firstName ~ ' ' ~ person.lastName } ) }}{% endblock %} {% block personcontent %} -
+

{{ 'Addresses history'|trans }}

+ +
{% if person.addresses|length == 0 %} @@ -33,29 +42,51 @@
{% endif %} +
+

{{ 'Person addresses'|trans }}

+
+
+
+

{{ 'Household addresses'|trans }}

+
+ + {% set row = 0 %} + {% set previousRowFrom = null %} + {% for address in person.addresses %} - {# if person address #} -
-
- {% if address.isNoAddress == true %} -
{{ 'address.consider homeless'|trans }}
- {% else %} - {{ address|chill_entity_render_box({ - 'multiline': false, 'with_valid_from': false - }) }} + {% set row = row + 1 %} + {% if address.validTo is not empty and address.validTo < previousRowFrom %} + +
+ +
+ {% if address.validTo is not empty %} + {{ address.validTo|format_date('short') }} {% endif %} +
+ {% set row = row + 1 %} + {% endif %} + + + {# if person address #} +
+ {{ address|chill_entity_render_box({ + 'render': 'bloc', + 'multiline': true, + 'extended_infos': true, + 'has_no_address': true + }) }}
    -
  • - -
  • +
-
{# endif #} -
+
{# if household address #}{#
@@ -65,10 +96,11 @@
{% if address.validFrom is not empty %} - {{ address.validFrom|format_date('long') }} + {{ address.validFrom|format_date('short') }} {% endif %}
+ {% set previousRowFrom = address.validFrom %} {% endfor %} {# TEST HOUSEHOLD POSITION @@ -86,7 +118,7 @@
-
01 janvier 1970
+
01/01/1970
{# END TEST #}
@@ -104,6 +136,5 @@ -
{% endblock %} diff --git a/src/Bundle/ChillPersonBundle/Resources/views/Household/addresses.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/Household/addresses.html.twig index d4f9df535..2f66447f8 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/Household/addresses.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/Household/addresses.html.twig @@ -5,68 +5,83 @@ {% block content %}
-

{{ block('title') }}

+

{{ block('title') }}

-
+ - {% if household.addresses|length == 0 %} - {{ 'No address given'|trans }} - {% else %} -
- {% endif %} +
- {% for address in household.addresses %} + {% if household.addresses|length == 0 %} + {{ 'No address given'|trans }} + {% else %} +
+ {% endif %} -
+ {% set row = 0 %} + {% set previousRowFrom = null %} -
-
- {% 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 %} -
- {% endif %} - {% if address.postCode is not empty %} -
- {{ address.postCode.code }} {{ address.postCode.name }} - ({{ address.postCode.country.name|localize_translatable_string }}) -
+ {% for address in household.addresses %} + + {% set row = row + 1 %} + {% if address.validTo is not empty and address.validTo < previousRowFrom %} + +
+ +
+ {% if address.validTo is not empty %} + {{ address.validTo|format_date('short') }} {% endif %} +
+ {% set row = row + 1 %} + {% endif %} + +
+
+ {{ address|chill_entity_render_box({ + 'render': 'bloc', + 'multiline': true, + 'extended_infos': true, + 'has_no_address': true + }) }} +
    +
  • + +
  • +
+
+ +
+ {% if address.validFrom is not empty %} + {{ address.validFrom|format_date('short') }} {% endif %}
-
    -
  • - -
  • -
-
+ {% set previousRowFrom = address.validFrom %} + {% endfor %} +
-
- {% if address.validFrom is not empty %} - {{ address.validFrom|format_date('long') }} - {% endif %} -
- - {% endfor %} - -
- - +
{% endblock %} diff --git a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml index be834632d..57b051d68 100644 --- a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml +++ b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml @@ -353,6 +353,7 @@ Household accompanying period: Parcours d'accompagnement du ménage Household summary: Résumé du ménage Edit household address: Modifier l'adresse du ménage Show household: Voir le ménage +Back to household: Revenir au ménage # accompanying course work Accompanying Course Actions: Actions d'accompagnements @@ -370,3 +371,8 @@ accompanying_course_work: results: Résultats - orientations goal: Objectif - motif - dispositif Any work: Aucune action d'accompagnement + +# +Person addresses: Adresses de résidence +Household addresses: Adresses de domicile +Insert an address: Insérer une adresse diff --git a/src/Bundle/ChillThirdPartyBundle/Resources/views/Entity/thirdparty.html.twig b/src/Bundle/ChillThirdPartyBundle/Resources/views/Entity/thirdparty.html.twig index 057be85c8..ed7bb73bd 100644 --- a/src/Bundle/ChillThirdPartyBundle/Resources/views/Entity/thirdparty.html.twig +++ b/src/Bundle/ChillThirdPartyBundle/Resources/views/Entity/thirdparty.html.twig @@ -66,11 +66,12 @@