change block personcontent to content more consistent with other templates and less need for if-statements

This commit is contained in:
2022-02-24 15:58:02 +01:00
parent f8ec0f85e5
commit c4e0b68ebe
64 changed files with 66 additions and 73 deletions

View File

@@ -18,7 +18,7 @@
{% block title page_title %}
{% block personcontent %}
{% block content %}
<h1>{{ page_title }}</h1>

View File

@@ -4,7 +4,7 @@
{% block title %}{{ 'Accompanying period list for person'|trans }}{% endblock title %}
{% block personcontent %}
{% block content %}
<div class="person-accompanyingperiods">
<h1>{{ 'Accompanying period list'|trans }}</h1>

View File

@@ -4,7 +4,7 @@
{% block title 'Re-Open a period'|trans %}
{% block personcontent %}
{% block content %}
<h1>{{ 'Re-Open a period'|trans }}</h1>

View File

@@ -20,7 +20,7 @@
{% block title 'Edit an address'|trans %}
{% block personcontent %}
{% block content %}
<div class="address-edit">
{% block content %}

View File

@@ -20,7 +20,7 @@
{% block title %}{{ 'Addresses history for %name%'|trans({ '%name%': person.firstName ~ ' ' ~ person.lastName } ) }}{% endblock %}
{% block personcontent %}
{% block content %}
<div class="person-address">
<h1>{{ 'Addresses history'|trans }}</h1>

View File

@@ -20,7 +20,7 @@
{% block title %}{{ 'New address'|trans }}{% endblock %}
{% block personcontent %}
{% block content %}
<div class="address-new">
{% block content %}

View File

@@ -3,7 +3,7 @@
{% set person = entity.person %}
{% set activeRouteKey = '' %}
{% block personcontent %}
{% block content %}
{% embed '@ChillMain/CRUD/_delete_content.html.twig' %}
{% endembed %}
{% endblock %}

View File

@@ -7,7 +7,7 @@
{% include('@ChillMain/CRUD/_edit_title.html.twig') %}
{% endblock title %}
{% block personcontent %}
{% block content %}
{% embed '@ChillMain/CRUD/_edit_content.html.twig' %}
{% endembed %}
{% endblock %}

View File

@@ -4,7 +4,7 @@
{% block title %}{{ ('crud.' ~ crud_name ~ '.index.title')|trans({'%crud_name%': crud_name}) }}{% endblock %}
{% block personcontent %}
{% block content %}
{% embed '@ChillPerson/CRUD/_index.html.twig' %}
{% block add_new %}
<li>

View File

@@ -7,7 +7,7 @@
{% embed('@ChillPerson/CRUD/_new_title.html.twig') %}{% endembed %}
{% endblock %}
{% block personcontent %}
{% block content %}
{% embed '@ChillPerson/CRUD/_new_content.html.twig' %}
{% block crud_content_header %}
<h1>{{ ('crud.'~crud_name~'.title_new')|trans({'%person%': person|chill_entity_render_string }) }}</h1>

View File

@@ -7,7 +7,7 @@
{% include('@ChillPerson/CRUD/_view_title.html.twig') %}
{% endblock %}
{% block personcontent %}
{% block content %}
{% embed '@ChillPerson/CRUD/_view_content.html.twig' %}
{% block crud_content_header %}
<h1>{{ ('crud.' ~ crud_name ~ '.title_view')|trans({'%person%': person|chill_entity_render_string }) }}</h1>

View File

@@ -20,7 +20,7 @@
{% block title %}{{ 'Update details for %name%'|trans({ '%name%': person|chill_entity_render_string } ) }}{% endblock %}
{% block personcontent %}
{% block content %}
<div class="person-edit">
<h1>{{ block('title') }}</h1>

View File

@@ -84,7 +84,7 @@
</div>
{% endmacro %}
{% block personcontent %}
{% block content %}
<div class="person-household">
<h1>{{ 'household.Household history'|trans }}</h1>

View File

@@ -25,7 +25,7 @@
{% block layout_wvm_content %}
<div class="row justify-content-center">
<div class="col-md-10 col-xxl">
{% block personcontent %}{# block personcontent empty #}{% endblock %}
{% block content %}{# block content empty #}{% endblock %}
</div>
</div>
{% endblock %}

View File

@@ -32,7 +32,7 @@ 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 %}
{% block content %}
<div class="person-view">
<div class="row">

View File

@@ -6,7 +6,7 @@
' ' ~ person.lastName }}{% endblock %}
{% block personcontent %}
{% block content %}
<div class="person-duplicate">
<h1>{{ 'Désigner un dossier doublon'|trans }}</h1>

View File

@@ -5,7 +5,7 @@
{% block title %}{{ 'Person duplicate'|trans|capitalize ~ ' ' ~ person.firstName|capitalize ~
' ' ~ person.lastName }}{% endblock %}
{% block personcontent %}
{% block content %}
<div class="person-duplicate">
<h1>{{ title|default('Person duplicate')|trans }}</h1>

View File

@@ -5,7 +5,7 @@
{% block title 'Remove resource'|trans %}
{% block personcontent %}
{% block content %}
{{ include('@ChillMain/Util/confirmation_template.html.twig',
{
'title' : 'Remove resource'|trans,

View File

@@ -14,7 +14,7 @@
{% block title %}{{ 'edit resource'|trans|capitalize }}{% endblock %}
{% block personcontent %}
{% block content %}
<h1 style="margin-bottom: 2rem;">{{ 'edit resource'|trans }}</h1>

View File

@@ -14,7 +14,7 @@
{{ encore_entry_link_tags('mod_pickentity_type') }}
{% endblock %}
{% block personcontent %}
{% block content %}
<h1>{{ 'List of resources'|trans }}</h1>

View File

@@ -4,7 +4,7 @@
{% block title %}{{ 'Delete residential address'|trans }}{% endblock %}
{% block personcontent %}
{% block content %}
<div class="address-new">
<h1>{{ block('title') }}</h1>

View File

@@ -4,7 +4,7 @@
{% block title 'Edit a residential address'|trans %}
{% block personcontent %}
{% block content %}
<div class="address-edit">
{% block content %}

View File

@@ -4,7 +4,7 @@
{% block title %}{{ 'Residential addresses history for %name%'|trans({ '%name%': person.firstName ~ ' ' ~ person.lastName } ) }}{% endblock %}
{% block personcontent %}
{% block content %}
<div class="person-address">
<h1>{{ 'Residential addresses history'|trans }}</h1>

View File

@@ -4,7 +4,7 @@
{% block title %}{{ 'New residential address'|trans }}{% endblock %}
{% block personcontent %}
{% block content %}
<div class="address-new">
{% block content %}

View File

@@ -26,7 +26,7 @@ This view should receive those arguments:
{% block title %}{{ 'Timeline for %name%'|trans({'%name%': person }) }}{% endblock %}
{% block personcontent %}
{% block content %}
<div class="timeline">
{{ timeline|raw }}