From e0dbe9cf9df7cf3a523a3d24b66dcf967146a0c4 Mon Sep 17 00:00:00 2001 From: Mathieu Jaumotte Date: Fri, 23 Jul 2021 11:38:53 +0200 Subject: [PATCH] layout content position for fullwidth pages --- .../views/CRUD/_edit_content.html.twig | 2 +- .../views/Household/members_editor.html.twig | 6 +- .../Resources/views/Person/view.html.twig | 421 +++++++++--------- 3 files changed, 214 insertions(+), 215 deletions(-) diff --git a/src/Bundle/ChillMainBundle/Resources/views/CRUD/_edit_content.html.twig b/src/Bundle/ChillMainBundle/Resources/views/CRUD/_edit_content.html.twig index bbbd3f59f..cc2673960 100644 --- a/src/Bundle/ChillMainBundle/Resources/views/CRUD/_edit_content.html.twig +++ b/src/Bundle/ChillMainBundle/Resources/views/CRUD/_edit_content.html.twig @@ -1,4 +1,4 @@ -
+
{% block crud_content_header %}

{{ ('crud.'~crud_name~'.title_edit')|trans }}

{% endblock crud_content_header %} diff --git a/src/Bundle/ChillPersonBundle/Resources/views/Household/members_editor.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/Household/members_editor.html.twig index 41d1cb69d..86a4a1e79 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/Household/members_editor.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/Household/members_editor.html.twig @@ -4,10 +4,10 @@ {% block title 'household.Edit household members'|trans %} {% block content %} -
+
-

{{ block('title') }}

-
+

{{ block('title') }}

+
{% endblock %} diff --git a/src/Bundle/ChillPersonBundle/Resources/views/Person/view.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/Person/view.html.twig index f2981857f..3a51e8939 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/Person/view.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/Person/view.html.twig @@ -38,221 +38,220 @@ This view should receive those arguments: {% block personcontent %}
-
- {% if person.memo is not empty and chill_person.fields.memo == 'visible' %} -
-
-

{{ 'Memo'|trans }}

+
+ {% if person.memo is not empty and chill_person.fields.memo == 'visible' %} +
+
+

{{ 'Memo'|trans }}

-
- {{ person.memo|chill_markdown_to_html }} -
- -
-
- {% endif %} - -
-
-

{{ 'General information'|trans }}

-
-
{{ 'First name'|trans }} :
-
{{ person.firstName }}
- -
{{ 'Last name'|trans }} :
-
{{ person.lastName }}
- {% for el in person.altNames %} - {% if el.key in alt_names|keys %} -
{{ alt_names[el.key]|localize_translatable_string }} :
-
{{ el.label }}
- {% endif %} - {% endfor %} - -
{{ 'Gender'|trans }} :
-
{{ ( person.gender|default('Not given'))|trans }}
-
-
+
+ {{ person.memo|chill_markdown_to_html }}
-
-
-

 {{ 'Birth information'|trans }}

-
-
{{ 'Date of birth'|trans }} :
-
- {%- if person.birthdate is not null -%} - {{ person.birthdate|format_date('long') }} - {%- else -%} - {{ 'Unknown date of birth'|trans }} - {%- endif -%} -
- - {%- if chill_person.fields.place_of_birth == 'visible' -%} -
{{ 'Place of birth'|trans }} :
- {% if person.placeOfBirth is not empty %} -
{{ person.placeOfBirth }}
- {% else %} -
{{ 'Not given'|trans }}
- {% endif %} - {%- endif -%} - {%- if chill_person.fields.country_of_birth == 'visible' -%} -
{{ 'Country of birth'|trans }} :
-
{% apply spaceless %} - {% if person.countryOfBirth is not null %} - {{ person.countryOfBirth.name|localize_translatable_string }} - {% else %} - {{ 'Unknown country of birth'|trans }} - {% endif %} - {% endapply %}
- {%- endif -%} -
-
-
-
- -
- {%- if chill_person.fields.nationality == 'visible' or chill_person.fields.spoken_languages == 'visible'-%} -
-
-

{{ 'Administrative information'|trans }}

- - {%- if chill_person.fields.nationality == 'visible' -%} -
-
{{ 'Nationality'|trans }} :
-
- {% if person.nationality is not null %} - {{ person.nationality.name|localize_translatable_string }} - {% else %} - {{ 'Without nationality'|trans }} - {% endif %} -
-
- {%- endif -%} - {%- if chill_person.fields.spoken_languages == 'visible' -%} -
-
{{'Spoken languages'|trans}} :
-
- {% if person.spokenLanguages|length == 0 %} - {{ 'Unknown spoken languages'|trans }} - {% else %} - {% for lang in person.spokenLanguages %} - {{ lang.name|localize_translatable_string }}{% if not loop.last %},{% endif %} - {% endfor %} - {% endif %} -
-
- {%- endif -%} - {%- if chill_person.fields.marital_status == 'visible' -%} -
-
{{'Marital status'|trans}} :
-
- {% if person.maritalStatus is not null %} - {{ person.maritalStatus.name|localize_translatable_string }} - {% else %} - {{ 'No data given'|trans }} - {% endif %} -
-
- {%- endif -%} -
-
- {%- endif -%} - - {%- if chill_person.fields.email == 'visible' - or chill_person.fields.phonenumber == 'visible' - or chill_person.fields.mobilenumber == 'visible' - or chill_person.fields.contact_info == 'visible' -%} -
-
-

 {{ 'Contact information'|trans }}

- - {%- if chill_person.fields.address == 'visible' -%} -
-
{{ 'Address'|trans }}
-
- {%- if person.lastAddress is not empty -%} - {{ address._render(person.lastAddress, {'has_no_address': true}) }} - - - - {%- else -%} - {{ 'No address given'|trans }} - - {{ 'Add an address'|trans }} - - {%- endif -%} -
-
- {%- endif -%} - - - {%- if chill_person.fields.email == 'visible' -%} -
-
{{ 'Email'|trans }} :
-
{% if person.email is not empty %}
{{ person.email|nl2br }}
{% else %}{{ 'No data given'|trans }}{% endif %}
-
- {%- endif -%} - {%- if chill_person.fields.phonenumber == 'visible' -%} -
-
{{ 'Phonenumber'|trans }} :
-
{% if person.phonenumber is not empty %}
{{ person.phonenumber|chill_format_phonenumber }}
{% else %}{{ 'No data given'|trans }}{% endif %}
-
- {% endif %} - {%- if chill_person.fields.mobilenumber == 'visible' -%} -
-
{{ 'Mobilenumber'|trans }} :
-
{% if person.mobilenumber is not empty %}
{{ person.mobilenumber|chill_format_phonenumber }}
{% else %}{{ 'No data given'|trans }}{% endif %}
-
- {% endif %} - {%- if chill_person.fields.contact_info == 'visible' -%} -
-
{{ 'Notes on contact information'|trans }} :
-
{% if person.contactInfo is not empty %}{{ person.contactInfo|nl2br }}{% else %}{{ 'No data given'|trans }}{% endif %}
-
- {%- endif -%} - -
-
- {%- endif -%} -
- - {% if cFGroup and (cFGroup.getActiveCustomFields|length > 0) %} -
-
-
- {{ chill_custom_fields_group_widget(person.cFData, cFGroup) }} -
-
-
- -
-
-
- {% endif %} - - {% if is_granted('CHILL_PERSON_UPDATE', person) %} - - {% endif %} +
+ {% endif %} + +
+
+

{{ 'General information'|trans }}

+
+
{{ 'First name'|trans }} :
+
{{ person.firstName }}
+ +
{{ 'Last name'|trans }} :
+
{{ person.lastName }}
+ {% for el in person.altNames %} + {% if el.key in alt_names|keys %} +
{{ alt_names[el.key]|localize_translatable_string }} :
+
{{ el.label }}
+ {% endif %} + {% endfor %} + +
{{ 'Gender'|trans }} :
+
{{ ( person.gender|default('Not given'))|trans }}
+
+
+
+ +
+
+

 {{ 'Birth information'|trans }}

+
+
{{ 'Date of birth'|trans }} :
+
+ {%- if person.birthdate is not null -%} + {{ person.birthdate|format_date('long') }} + {%- else -%} + {{ 'Unknown date of birth'|trans }} + {%- endif -%} +
+ + {%- if chill_person.fields.place_of_birth == 'visible' -%} +
{{ 'Place of birth'|trans }} :
+ {% if person.placeOfBirth is not empty %} +
{{ person.placeOfBirth }}
+ {% else %} +
{{ 'Not given'|trans }}
+ {% endif %} + {%- endif -%} + {%- if chill_person.fields.country_of_birth == 'visible' -%} +
{{ 'Country of birth'|trans }} :
+
{% apply spaceless %} + {% if person.countryOfBirth is not null %} + {{ person.countryOfBirth.name|localize_translatable_string }} + {% else %} + {{ 'Unknown country of birth'|trans }} + {% endif %} + {% endapply %}
+ {%- endif -%} +
+
+
+
+ +
+ {%- if chill_person.fields.nationality == 'visible' or chill_person.fields.spoken_languages == 'visible'-%} +
+
+

{{ 'Administrative information'|trans }}

+ + {%- if chill_person.fields.nationality == 'visible' -%} +
+
{{ 'Nationality'|trans }} :
+
+ {% if person.nationality is not null %} + {{ person.nationality.name|localize_translatable_string }} + {% else %} + {{ 'Without nationality'|trans }} + {% endif %} +
+
+ {%- endif -%} + {%- if chill_person.fields.spoken_languages == 'visible' -%} +
+
{{'Spoken languages'|trans}} :
+
+ {% if person.spokenLanguages|length == 0 %} + {{ 'Unknown spoken languages'|trans }} + {% else %} + {% for lang in person.spokenLanguages %} + {{ lang.name|localize_translatable_string }}{% if not loop.last %},{% endif %} + {% endfor %} + {% endif %} +
+
+ {%- endif -%} + {%- if chill_person.fields.marital_status == 'visible' -%} +
+
{{'Marital status'|trans}} :
+
+ {% if person.maritalStatus is not null %} + {{ person.maritalStatus.name|localize_translatable_string }} + {% else %} + {{ 'No data given'|trans }} + {% endif %} +
+
+ {%- endif -%} +
+
+ {%- endif -%} + + {%- if chill_person.fields.email == 'visible' + or chill_person.fields.phonenumber == 'visible' + or chill_person.fields.mobilenumber == 'visible' + or chill_person.fields.contact_info == 'visible' -%} +
+
+

 {{ 'Contact information'|trans }}

+ + {%- if chill_person.fields.address == 'visible' -%} +
+
{{ 'Address'|trans }}
+
+ {%- if person.lastAddress is not empty -%} + {{ address._render(person.lastAddress, {'has_no_address': true}) }} + + + + {%- else -%} + {{ 'No address given'|trans }} + + {{ 'Add an address'|trans }} + + {%- endif -%} +
+
+ {%- endif -%} + + + {%- if chill_person.fields.email == 'visible' -%} +
+
{{ 'Email'|trans }} :
+
{% if person.email is not empty %}
{{ person.email|nl2br }}
{% else %}{{ 'No data given'|trans }}{% endif %}
+
+ {%- endif -%} + {%- if chill_person.fields.phonenumber == 'visible' -%} +
+
{{ 'Phonenumber'|trans }} :
+
{% if person.phonenumber is not empty %}
{{ person.phonenumber|chill_format_phonenumber }}
{% else %}{{ 'No data given'|trans }}{% endif %}
+
+ {% endif %} + {%- if chill_person.fields.mobilenumber == 'visible' -%} +
+
{{ 'Mobilenumber'|trans }} :
+
{% if person.mobilenumber is not empty %}
{{ person.mobilenumber|chill_format_phonenumber }}
{% else %}{{ 'No data given'|trans }}{% endif %}
+
+ {% endif %} + {%- if chill_person.fields.contact_info == 'visible' -%} +
+
{{ 'Notes on contact information'|trans }} :
+
{% if person.contactInfo is not empty %}{{ person.contactInfo|nl2br }}{% else %}{{ 'No data given'|trans }}{% endif %}
+
+ {%- endif -%} + +
+
+ {%- endif -%} +
+ + {% if cFGroup and (cFGroup.getActiveCustomFields|length > 0) %} +
+
+
+ {{ chill_custom_fields_group_widget(person.cFData, cFGroup) }} +
+
+
+ +
+
+
+ {% endif %} + + {% if is_granted('CHILL_PERSON_UPDATE', person) %} + + {% endif %}
{% endblock %}