From c9562ebdf78a27aabcf6a4bf75149f8efb918563 Mon Sep 17 00:00:00 2001 From: Mathieu Jaumotte Date: Thu, 22 Jul 2021 22:09:31 +0200 Subject: [PATCH] improve layout classes --- .../Resources/views/layout.html.twig | 25 ++++---- .../views/layoutWithVerticalMenu.html.twig | 62 +++++++++---------- .../views/AccompanyingCourse/layout.html.twig | 2 +- .../views/Household/layout.html.twig | 2 +- .../Resources/views/Person/create.html.twig | 61 +++++++++--------- .../Resources/views/Person/layout.html.twig | 2 +- .../Widget/homepage_add_a_person.html.twig | 14 +++-- 7 files changed, 84 insertions(+), 84 deletions(-) diff --git a/src/Bundle/ChillMainBundle/Resources/views/layout.html.twig b/src/Bundle/ChillMainBundle/Resources/views/layout.html.twig index b06d7db90..fc6f707db 100644 --- a/src/Bundle/ChillMainBundle/Resources/views/layout.html.twig +++ b/src/Bundle/ChillMainBundle/Resources/views/layout.html.twig @@ -39,20 +39,21 @@ {{ include('@ChillMain/Layout/_header.html.twig') }} - - {% block top_banner %}{# - To use if you want to add a banner below the header (ie the menu) + + {% block top_banner %}{# + To use if you want to add a banner below the header (ie the menu) #}{% endblock %}
- {% block sublayout_content %}
-
- + + {% block sublayout_content %} +
+ {# Flash messages ! #} {% if app.session.flashbag.all()|length > 0 %} -
- +
+ {% for flashMessage in app.session.flashbag.get('success') %}
{{ flashMessage|raw }} @@ -75,13 +76,13 @@ {% endif %} {% block content %} - - {% endblock %}
{{ include('@ChillMain/Layout/_footer.html.twig') }} diff --git a/src/Bundle/ChillMainBundle/Resources/views/layoutWithVerticalMenu.html.twig b/src/Bundle/ChillMainBundle/Resources/views/layoutWithVerticalMenu.html.twig index 21a56b027..a5b43a9e1 100644 --- a/src/Bundle/ChillMainBundle/Resources/views/layoutWithVerticalMenu.html.twig +++ b/src/Bundle/ChillMainBundle/Resources/views/layoutWithVerticalMenu.html.twig @@ -24,42 +24,40 @@ {% extends "@ChillMain/layout.html.twig" %} {% block sublayout_content %} -
-
-
- - {# Flash messages ! #} - {% if app.session.flashbag.all()|length > 0 %} -
- - {% for flashMessage in app.session.flashbag.get('success') %} -
- {{ flashMessage|raw }} -
- {% endfor %} +
+
- {% for flashMessage in app.session.flashbag.get('error') %} -
- {{ flashMessage|raw }} -
- {% endfor %} + {# Flash messages ! #} + {% if app.session.flashbag.all()|length > 0 %} +
- {% for flashMessage in app.session.flashbag.get('notice') %} -
- {{ flashMessage|raw }} -
- {% endfor %} - -
- {% endif %} + {% for flashMessage in app.session.flashbag.get('success') %} +
+ {{ flashMessage|raw }} +
+ {% endfor %} + + {% for flashMessage in app.session.flashbag.get('error') %} +
+ {{ flashMessage|raw }} +
+ {% endfor %} + + {% for flashMessage in app.session.flashbag.get('notice') %} +
+ {{ flashMessage|raw }} +
+ {% endfor %} - {% block layout_wvm_content %} - {% endblock %} -
-
- {% block vertical_menu_content %} - {% endblock %}
+ {% endif %} + + {% block layout_wvm_content %} + {% endblock %} +
+
+ {% block vertical_menu_content %} + {% endblock %}
{% endblock %} diff --git a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/layout.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/layout.html.twig index c04be7180..8ccccb3d4 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/layout.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/layout.html.twig @@ -5,7 +5,7 @@ {% endblock %} {% block layout_wvm_content %} -
+
{% block content %}{% endblock %}
diff --git a/src/Bundle/ChillPersonBundle/Resources/views/Household/layout.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/Household/layout.html.twig index d83baeb54..d97de654f 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/Household/layout.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/Household/layout.html.twig @@ -5,7 +5,7 @@ {% endblock %} {% block layout_wvm_content %} -
+
{% block content %}{% endblock %}
diff --git a/src/Bundle/ChillPersonBundle/Resources/views/Person/create.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/Person/create.html.twig index 9d17cba9d..3725684c8 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/Person/create.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/Person/create.html.twig @@ -19,37 +19,34 @@ {% block title %}{{ 'Add a person'|trans }}{% endblock title %} {% block content %} -
-
- -
- {{ form_start(form) }} - -

{{ 'Add a person'|trans }}

- - {{ form_row(form.firstName, { 'label' : 'First name'|trans }) }} - - {{ form_row(form.lastName, { 'label' : 'Last name'|trans }) }} - - {% if form.altNames is defined %} - {{ form_widget(form.altNames) }} - {% endif %} - - {{ form_row(form.birthdate, { 'label' : 'Date of birth'|trans }) }} - - {{ form_row(form.gender, { 'label' : 'Gender'|trans }) }} - - {{ form_row(form.creation_date, { 'label' : 'Creation date'|trans }) }} - - {{ form_rest(form) }} - - - - {{ form_end(form) }} -
- -
+
+ + {{ form_start(form) }} + +

{{ 'Add a person'|trans }}

+ + {{ form_row(form.firstName, { 'label' : 'First name'|trans }) }} + + {{ form_row(form.lastName, { 'label' : 'Last name'|trans }) }} + + {% if form.altNames is defined %} + {{ form_widget(form.altNames) }} + {% endif %} + + {{ form_row(form.birthdate, { 'label' : 'Date of birth'|trans }) }} + + {{ form_row(form.gender, { 'label' : 'Gender'|trans }) }} + + {{ form_row(form.creation_date, { 'label' : 'Creation date'|trans }) }} + + {{ form_rest(form) }} + + + + {{ form_end(form) }} + +
{% endblock content %} diff --git a/src/Bundle/ChillPersonBundle/Resources/views/Person/layout.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/Person/layout.html.twig index 0a2c862b3..677829066 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/Person/layout.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/Person/layout.html.twig @@ -23,7 +23,7 @@ {% endblock %} {% block layout_wvm_content %} -
+
{% block personcontent %}{# block personcontent empty #}{% endblock %}
diff --git a/src/Bundle/ChillPersonBundle/Resources/views/Widget/homepage_add_a_person.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/Widget/homepage_add_a_person.html.twig index 57a5b6059..92f5b9313 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/Widget/homepage_add_a_person.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/Widget/homepage_add_a_person.html.twig @@ -1,9 +1,11 @@ {% if is_granted('CHILL_PERSON_CREATE') %} -