diff --git a/src/Bundle/ChillMainBundle/Resources/views/Form/fields.html.twig b/src/Bundle/ChillMainBundle/Resources/views/Form/fields.html.twig index 1e2bf713f..ce406286b 100644 --- a/src/Bundle/ChillMainBundle/Resources/views/Form/fields.html.twig +++ b/src/Bundle/ChillMainBundle/Resources/views/Form/fields.html.twig @@ -192,3 +192,9 @@ {% endif %} {% endfor %} {% endblock %} + +{% block comment_widget %} + {% for entry in form %} + {{ form_widget(entry) }} + {% endfor %} +{% endblock comment_widget %} diff --git a/src/Bundle/ChillPersonBundle/Resources/public/chill/chillperson.scss b/src/Bundle/ChillPersonBundle/Resources/public/chill/chillperson.scss index f3759aef7..071d0f9a5 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/chill/chillperson.scss +++ b/src/Bundle/ChillPersonBundle/Resources/public/chill/chillperson.scss @@ -185,6 +185,29 @@ div.banner { } } +div.household-resume { + display: flex; + flex-direction: row; + align-items: center; + + div.col-address { + font-size: 120%; + padding-left: 1em; + + } + div.col-comment { + //padding: 0; + margin-bottom: 1rem; + display: flex; + flex-direction: column; + > * > * { + & > .chill-user-quote { + margin: 1.5em -1.67em 0; + } + } + } +} + /* * BADGES, MARKS, PINS * for chill person theme diff --git a/src/Bundle/ChillPersonBundle/Resources/views/Address/_insert_vue_address.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/Address/_insert_vue_address.html.twig index 8038257d6..e235aae15 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/Address/_insert_vue_address.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/Address/_insert_vue_address.html.twig @@ -9,6 +9,9 @@ * modalTitle twig translated chain * buttonText twig translated chain * buttonSize bootstrap class like 'btn-sm' + * buttonDisplayText bool + * binModalStep1 bool + * binModalStep2 bool #}
diff --git a/src/Bundle/ChillPersonBundle/Resources/views/Household/_render_member.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/Household/_render_member.html.twig index 25160ff5b..5b41a15e3 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/Household/_render_member.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/Household/_render_member.html.twig @@ -31,7 +31,7 @@
  • diff --git a/src/Bundle/ChillPersonBundle/Resources/views/Household/layout.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/Household/layout.html.twig index d97de654f..0bd208e7a 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/Household/layout.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/Household/layout.html.twig @@ -17,4 +17,8 @@ 'layout': '@ChillPerson/menu.html.twig', 'args' : { 'household': household } }) }} + + {% block block_post_menu %} + {% endblock %} + {% endblock %} diff --git a/src/Bundle/ChillPersonBundle/Resources/views/Household/summary.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/Household/summary.html.twig index 1568b6bed..9b553f0f0 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/Household/summary.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/Household/summary.html.twig @@ -2,163 +2,195 @@ {% block title 'household.Household summary'|trans %} +{% block block_post_menu %} +
    +{% endblock %} + {% block content %}
    -

    {{ block('title') }}

    + {# +

    {{ block('title') }}

    +

    {{ 'household.Current address'|trans }}

    + #} -

    {{ 'household.Current address'|trans }}

    + {% set address = household.currentAddress %} -{% set address = household.currentAddress %} - -{% if address is empty %} -

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

    -{% else %} -
    -
    - {{ address|chill_entity_render_box({'multiline': true}) }} -
    -
    -{% endif %} - -

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

    - -{% if form is not null %} - {{ form_start(form) }} - - {{ form_row(form.commentMembers) }} - -
    - {{ form_row(form.waitingForBirth) }} -
    - -
    - {{ form_row(form.waitingForBirthDate) }} -
    - - - - {{ form_end(form) }} -{% else %} - - {% if not household.commentMembers.isEmpty() %} - {{ household.commentMembers|chill_entity_render_box }} - {% endif %} - - {% if household.waitingForBirth %} - {% if household.waitingForBirthDate is not null %} - {{ 'household.Expecting for birth on date'|trans({ 'date': household.waitingForBirthDate|format_date('long') }) }} + {% if address is empty %} +

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

    {% else %} - {{ 'household.Expecting for birth'|trans }} +
    + +
    + +

    {{ 'Address'|trans }}

    + + {{ address|chill_entity_render_box({'multiline': true}) }} + +
      +
    • + {# include vue_address component #} + {% include '@ChillPerson/Address/_insert_vue_address.html.twig' with { + mode: 'create', + buttonSize: 'btn-sm', + buttonText: 'Move household', + modalTitle: 'Move household', + buttonDisplayText: false + } %} +
    • +
    • + + + +
    • +
    + +
    +
    + {% if form is null %} + + {% if household.waitingForBirth or not household.commentMembers.isEmpty() %} +
    + {% if household.waitingForBirth %} + + {% if household.waitingForBirthDate is not null %} + {{ 'household.Expecting for birth on date'|trans({ 'date': household.waitingForBirthDate|format_date('long') }) }} + {% else %} + {{ 'household.Expecting for birth'|trans }} + {% endif %} + {% endif %} + + {% if not household.commentMembers.isEmpty() %} + {{ household.commentMembers|chill_entity_render_box }} + {% endif %} +
    + {% endif %} + + {% if not household.commentMembers.isEmpty() %} + + {{ 'household.Edit comment and expecting birth'|trans }} + + {% else %} + + {{ 'household.New comment and expecting birth'|trans }} + + {% endif %} + + {% else %} + + {{ form_start(form) }} +
    + {{ form_widget(form.waitingForBirth) }} +
    +
    + {{ form_widget(form.waitingForBirthDate) }} +
    +
    + {{ form_widget(form.commentMembers) }} +
    +
      +
    • + +
    • +
    + {{ form_end(form) }} + + {% endif %} + +
    +
    {% endif %} - {% else %} -

    - {{ 'household.Any expecting birth'|trans }} -

    - {% endif %} - +

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

    -{% endif %} + {% for p in positions %} +
    +

    {{ p.label|localize_translatable_string }} + {% if false == p.shareHousehold %} + + {% endif %} +

    + {%- set members = household.currentMembersByPosition(p) %} -{% for p in positions %} -
    -

    {{ p.label|localize_translatable_string }} - {% if false == p.shareHousehold %} - + {% macro customButtons(member, household) %} +
  • + +
  • +
  • + +
  • + {% endmacro %} + + {% if members|length > 0 %} +
    + {% for m in members %} + {% include '@ChillPerson/Household/_render_member.html.twig' with { + 'member': m, + 'customButtons': { 'after': _self.customButtons(m, household) } + } %} + {% endfor %} +
    + {% else %} +

    {{ 'household.Any persons into this position'|trans }}

    {% endif %} -

    - {%- set members = household.currentMembersByPosition(p) %} + {% set members = household.nonCurrentMembersByPosition(p) %} + {% if members|length > 0 %} - {% macro customButtons(member, household) %} -
  • - - {{ 'household.Leave'|trans }} -
  • -
  • - -
  • - {% endmacro %} - - {% if members|length > 0 %} -
    - {% for m in members %} - {% include '@ChillPerson/Household/_render_member.html.twig' with { - 'member': m, - 'customButtons': { 'after': _self.customButtons(m, household) } - } %} - {% endfor %} -
    - {% else %} -

    {{ 'household.Any persons into this position'|trans }}

    - {% endif %} - - {% set members = household.nonCurrentMembersByPosition(p) %} - {% if members|length > 0 %} - - -
    -
    -

    - -

    -
    -
    - {% for m in members %} - {% include '@ChillPerson/Household/_render_member.html.twig' with { 'member': m } %} - {% endfor %} + +
    +
    +

    + +

    +
    +
    + {% for m in members %} + {% include '@ChillPerson/Household/_render_member.html.twig' with { 'member': m } %} + {% endfor %} +
    + {% endif %} +
    - {% endif %} + {% endfor %} -
    -{% endfor %} - - +
    {% endblock %} diff --git a/src/Bundle/ChillPersonBundle/translations/messages+intl-icu.fr.yaml b/src/Bundle/ChillPersonBundle/translations/messages+intl-icu.fr.yaml index f1362e7ae..cea908ccf 100644 --- a/src/Bundle/ChillPersonBundle/translations/messages+intl-icu.fr.yaml +++ b/src/Bundle/ChillPersonBundle/translations/messages+intl-icu.fr.yaml @@ -43,7 +43,7 @@ household: Current household members: Membres actuels Household summary: Résumé du ménage Accompanying period: Parcours d'accompagnement - Addresses: Adresses + Addresses: Historique adresse Current address: Adresse actuelle Household does not have any address currently: Le ménage n'a pas d'adresse renseignée actuellement Edit household members: Modifier l'appartenance au ménage @@ -56,7 +56,8 @@ household: Expecting for birth on date: Naissance attendue pour le {date} Expecting for birth: Naissance attendue (date inconnue) Any expecting birth: Aucune naissance proche n'a été renseignée. - Comment and expecting birth: Mettre à jour le commentaire + New comment and expecting birth: Écrire un commentaire + Edit comment and expecting birth: Mettre à jour le commentaire Edit member metadata: Données supplémentaires comment_membership: Commentaire général sur les membres expecting_birth: Naissance attendue ?