From ce8207ea6505cbd2030dba358cc1d7962da6515e Mon Sep 17 00:00:00 2001 From: Mathieu Jaumotte Date: Thu, 8 Jul 2021 11:26:26 +0200 Subject: [PATCH] adapt person details page with bootstrap grid --- .../Resources/views/Person/view.html.twig | 56 ++++++++----------- .../Resources/views/layout.html.twig | 4 +- 2 files changed, 24 insertions(+), 36 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Resources/views/Person/view.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/Person/view.html.twig index 88e69a389..5a80951ba 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/Person/view.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/Person/view.html.twig @@ -35,13 +35,11 @@ This view should receive those arguments: {% set edit_tmp_args = { 'form_path_args' : { 'person_id': person.id }, 'form_path_key' : 'chill_person_general_edit' } %} - {% block personcontent %} -
-
+
{% if person.memo is not empty and chill_person.fields.memo == 'visible' %}
@@ -55,10 +53,10 @@ This view should receive those arguments:
{% endif %} -
+ +

{{ 'General information'|trans }}

-
{{ 'First name'|trans }} :
{{ person.firstName }}
@@ -75,16 +73,12 @@ This view should receive those arguments:
{{ 'Gender'|trans }} :
{{ ( person.gender|default('Not given'))|trans }}
- - -
-
+

 {{ 'Birth information'|trans }}

-
{{ 'Date of birth'|trans }} :
@@ -114,17 +108,13 @@ This view should receive those arguments: {% endapply %}
{%- endif -%}
- -
-
-
{%- if chill_person.fields.nationality == 'visible' or chill_person.fields.spoken_languages == 'visible'-%} -
+

{{ 'Administrative information'|trans }}

@@ -166,13 +156,15 @@ This view should receive those arguments: {%- 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' -%} -
+ + {%- 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 }}

@@ -233,16 +225,13 @@ This view should receive those arguments:
{% if person.contactInfo is not empty %}{{ person.contactInfo|nl2br }}{% else %}{{ 'No data given'|trans }}{% endif %}
{%- endif -%} -
{%- endif -%}
-
- - {% if cFGroup and (cFGroup.getActiveCustomFields|length > 0) %} -
+ + {% if cFGroup and (cFGroup.getActiveCustomFields|length > 0) %}
@@ -250,25 +239,24 @@ This view should receive those arguments:
-
- -
-
-
- {% endif %} + +
+
+
+ {% endif %} +
+ {% if is_granted('CHILL_PERSON_UPDATE', person) %} -
-
- +
{% endblock %} diff --git a/src/Bundle/ChillPersonBundle/Resources/views/layout.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/layout.html.twig index f50bbd746..33c0cbf7a 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/layout.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/layout.html.twig @@ -124,8 +124,8 @@ {% endblock %} {% block layout_wvm_content %} -
- {% block personcontent %}{%endblock%} +
+ {% block personcontent %}{# block personcontent empty #}{% endblock %}
{% endblock %}