From f1c29a8bd3b782d26871c37a5965c3cc91be63ae Mon Sep 17 00:00:00 2001 From: Mathieu Jaumotte Date: Wed, 22 Sep 2021 12:08:16 +0200 Subject: [PATCH] Household summary: improve Address display when there is no address --- .../views/Household/summary.html.twig | 68 +++++++++---------- 1 file changed, 32 insertions(+), 36 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Resources/views/Household/summary.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/Household/summary.html.twig index d8c53dbf5..115f5a208 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/Household/summary.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/Household/summary.html.twig @@ -16,42 +16,39 @@ {% set address = household.currentAddress %} - {% if address is empty %} -

{{ 'household.Household does not have any address currently'|trans }}

- {% else %} -
- -
- -

{{ 'Address'|trans }}

+
+
+

{{ 'Address'|trans }}

+ {% if address is empty %} +

{{ 'household.Household does not have any address currently'|trans }}

+ {% else %} {{ address|chill_entity_render_box({'multiline': true}) }} + {% endif %} -
    -
  • - {# include vue_address component #} - {% include '@ChillMain/Address/_insert_vue_address.html.twig' with { - targetEntity: { name: 'household', id: household.id }, - backUrl: path('chill_person_household_addresses', { 'household_id': household.id }), - mode: 'new', - buttonSize: 'btn-sm', - buttonText: 'Move household', - modalTitle: 'Move household', - buttonDisplayText: false, - } %} - {# - openPanesInModal: false - #} -
  • -
  • - - - -
  • -
- -
+
    +
  • + {# include vue_address component #} + {% include '@ChillMain/Address/_insert_vue_address.html.twig' with { + targetEntity: { name: 'household', id: household.id }, + backUrl: path('chill_person_household_summary', { 'household_id': household.id }), + forceRedirect: true, + mode: 'new', + buttonSize: 'btn-sm', + buttonText: 'Move household', + modalTitle: 'Move household', + buttonDisplayText: false, + } %} +
  • +
  • + + + +
  • +
+
+ {% if address is not empty %}
{% if form is null %} @@ -106,10 +103,9 @@ {{ form_end(form) }} {% endif %} -
-
- {% endif %} + {% endif %} +

{{ 'household.Household members'|trans }}