re-indent file

This commit is contained in:
Mathieu Jaumotte 2021-07-28 16:48:50 +02:00
parent 42784cf584
commit 2893b9c726

View File

@ -21,43 +21,42 @@
{% endif %}
{% if withoutHousehold|length > 0 %}
<div class="alert alert-danger alert-with-actions">
<div class="message">
{{ 'Some peoples does not belong to any household currently. Add them to an household soon'|trans }}
</div>
<ul class="record_actions">
<li>
<button class="btn btn-create" data-bs-toggle="collapse" href="#withoutHouseholdList">
{{ 'Add to household now'|trans }}
</button>
</li>
</ul>
</div>
<div id="withoutHouseholdList" class="collapse">
<form method="GET" action="{{ chill_path_add_return_path('chill_person_household_members_editor') }}">
<h3>{{ 'household.Select people to move'|trans }}</h3>
<ul>
{% for p in withoutHousehold %}
<li>
<input type="checkbox" name="persons[]" value="{{ p.id }}" checked />
{{ p|chill_entity_render_box }}
</li>
{% endfor %}
</ul>
<input type="hidden" name="expand_suggestions" value="true" />
<input type="hidden" name="accompanying_period_id" value="{{ accompanyingCourse.id }}" />
<div class="alert alert-danger alert-with-actions">
<div class="message">
{{ 'Some peoples does not belong to any household currently. Add them to an household soon'|trans }}
</div>
<ul class="record_actions">
<li>
<button type="submit" class="btn btn-edit">
{{ 'household.Household editor'|trans }}
</button>
</li>
<li>
<button class="btn btn-create" data-bs-toggle="collapse" href="#withoutHouseholdList">
{{ 'Add to household now'|trans }}
</button>
</li>
</ul>
</form>
</div>
<div id="withoutHouseholdList" class="collapse">
<form method="GET"
action="{{ chill_path_add_return_path('chill_person_household_members_editor') }}">
<h3>{{ 'household.Select people to move'|trans }}</h3>
<ul>
{% for p in withoutHousehold %}
<li>
<input type="checkbox" name="persons[]" value="{{ p.id }}" checked />
{{ p|chill_entity_render_box }}
</li>
{% endfor %}
</ul>
<input type="hidden" name="expand_suggestions" value="true" />
<input type="hidden" name="accompanying_period_id" value="{{ accompanyingCourse.id }}" />
<ul class="record_actions">
<li>
<button type="submit" class="btn btn-edit">
{{ 'household.Household editor'|trans }}
</button>
</li>
</ul>
</form>
</div>
{% endif %}
@ -129,97 +128,96 @@
<h2>{{ 'Requestor'|trans }}</h2>
{% if accompanyingCourse.requestor == null %}
<p>{{ 'Any requestor to this accompanying course'|trans }}</p>
<p>{{ 'Any requestor to this accompanying course'|trans }}</p>
{% elseif accompanyingCourse.requestorPerson is not empty %}
{% set r = accompanyingCourse.requestorPerson %}
<div class="item-row">
<div class="item-col">
<h3>
{{ r.firstname ~ ' ' ~ r.lastname }}
<span class="badge rounded-pill bg-secondary">{{ 'Usager' }}</span>
</h3>
<p>
{% set born = (r.gender == 'woman') ? 'née': 'né' %}
{% set gender = (r.gender == 'woman') ? 'fa-venus' :
(r.gender == 'man') ? 'fa-mars' : 'fa-neuter' %}
{% set genderTitle = (r.gender == 'woman') ? 'femme' :
(r.gender == 'homme') ? 'fa-mars' : 'neutre' %}
<i class="fa fa-fw {{ gender }}" title="{{ genderTitle }}"></i>{{ born ~ ' le ' ~ r.birthdate|format_date('short') }}
</p>
</div>
<div class="item-col">
<ul class="list-content fa-ul">
<li>
{% if r.mobilenumber %}
<i class="fa fa-li fa-mobile"></i><a href="{{ 'tel:' ~ r.mobilenumber }}">
{{ r.mobilenumber|chill_format_phonenumber }}</a>
{% else %}
<i class="fa fa-li fa-phone"></i>
{% if r.phonenumber %}
<a href="{{ 'tel:' ~ r.phonenumber }}">{{ r.phonenumber|chill_format_phonenumber }}</a>
{% else %}
<span class="chill-no-data-statement">{{ 'No data given'|trans }}</span>
{% endif %}
{% endif %}
</li>
<li>
<i class="fa fa-li fa-map-marker"></i>
{%- if r.lastAddress is not empty -%}
{{ r.getLastAddress|chill_entity_render_box({'with_valid_from': false}) }}
{%- else -%}
<span class="chill-no-data-statement">{{ 'No address given'|trans }}</span>
{%- endif -%}
</li>
</ul>
<ul class="record_actions">
{% set r = accompanyingCourse.requestorPerson %}
<div class="item-row">
<div class="item-col">
<h3>
{{ r.firstname ~ ' ' ~ r.lastname }}
<span class="badge rounded-pill bg-secondary">{{ 'Usager' }}</span>
</h3>
<p>
{% set born = (r.gender == 'woman') ? 'née': 'né' %}
{% set gender = (r.gender == 'woman') ? 'fa-venus' :
(r.gender == 'man') ? 'fa-mars' : 'fa-neuter' %}
{% set genderTitle = (r.gender == 'woman') ? 'femme' :
(r.gender == 'homme') ? 'fa-mars' : 'neutre' %}
<i class="fa fa-fw {{ gender }}" title="{{ genderTitle }}"></i>{{ born ~ ' le ' ~ r.birthdate|format_date('short') }}
</p>
</div>
<div class="item-col">
<ul class="list-content fa-ul">
<li>
{% if r.mobilenumber %}
<i class="fa fa-li fa-mobile"></i><a href="{{ 'tel:' ~ r.mobilenumber }}">
{{ r.mobilenumber|chill_format_phonenumber }}</a>
{% else %}
<i class="fa fa-li fa-phone"></i>
{% if r.phonenumber %}
<a href="{{ 'tel:' ~ r.phonenumber }}">{{ r.phonenumber|chill_format_phonenumber }}</a>
{% else %}
<span class="chill-no-data-statement">{{ 'No data given'|trans }}</span>
{% endif %}
{% endif %}
</li>
<li>
<i class="fa fa-li fa-map-marker"></i>
{%- if r.lastAddress is not empty -%}
{{ r.getLastAddress|chill_entity_render_box({'with_valid_from': false}) }}
{%- else -%}
<span class="chill-no-data-statement">{{ 'No address given'|trans }}</span>
{%- endif -%}
</li>
</ul>
<ul class="record_actions">
<li>
<a href="{{ path('chill_person_view', { person_id: r.id }) }}" class="btn btn-show" target="_blank" title="Voir"></a>
</li>
</ul>
</div>
</div>
</ul>
</div>
</div>
{% elseif accompanyingCourse.requestorThirdParty is not empty %}
{% set r = accompanyingCourse.requestorThirdParty %}
<div class="item-row">
<div class="item-col">
<h3>
{% elseif accompanyingCourse.requestorThirdParty is not empty %}
{% set r = accompanyingCourse.requestorThirdParty %}
<div class="item-row">
<div class="item-col">
<h3>
{{ r.name }}
<span class="badge rounded-pill bg-secondary">{{ 'Tiers' }}</span>
</h3>
</div>
<div class="item-col">
<ul class="list-content fa-ul">
<li><i class="fa fa-li fa-envelope-o"></i>
<a href="{{ 'mailto:' ~ r.email }}">
{{ r.email|chill_print_or_message("thirdparty.No_email") }}
</a>
</li>
<li><i class="fa fa-li fa-phone"></i>
{% if r.telephone %}
<a href="{{ 'tel:' ~ r.telephone }}">{{ r.telephone|chill_format_phonenumber }}</a>
{% else %}
<span class="chill-no-data-statement">{{ 'thirdparty.No_phonenumber'|trans }}</span>
{% endif %}
</li>
<li><i class="fa fa-li fa-map-marker"></i>
{%- if r.address is not empty -%}
{{ r.getAddress|chill_entity_render_box({'with_valid_from': false}) }}
{%- else -%}
<span class="chill-no-data-statement">{{ 'No address given'|trans }}</span>
{%- endif -%}
</li>
</ul>
<ul class="record_actions">
<li>
<a href="{{ path('chill_3party_3party_show', { thirdparty_id: r.id }) }}" class="btn btn-show" target="_blank" title="Voir"></a>
</li>
</ul>
</div>
</div>
</h3>
</div>
<div class="item-col">
<ul class="list-content fa-ul">
<li><i class="fa fa-li fa-envelope-o"></i>
<a href="{{ 'mailto:' ~ r.email }}">
{{ r.email|chill_print_or_message("thirdparty.No_email") }}
</a>
</li>
<li><i class="fa fa-li fa-phone"></i>
{% if r.telephone %}
<a href="{{ 'tel:' ~ r.telephone }}">{{ r.telephone|chill_format_phonenumber }}</a>
{% else %}
<span class="chill-no-data-statement">{{ 'thirdparty.No_phonenumber'|trans }}</span>
{% endif %}
</li>
<li><i class="fa fa-li fa-map-marker"></i>
{%- if r.address is not empty -%}
{{ r.getAddress|chill_entity_render_box({'with_valid_from': false}) }}
{%- else -%}
<span class="chill-no-data-statement">{{ 'No address given'|trans }}</span>
{%- endif -%}
</li>
</ul>
<ul class="record_actions">
<li>
<a href="{{ path('chill_3party_3party_show', { thirdparty_id: r.id }) }}" class="btn btn-show" target="_blank" title="Voir"></a>
</li>
</ul>
</div>
</div>
{% endif %}
<div class="resources my-5">
<h2 class="mb-3">{{ 'Resources'|trans }}</h2>
{% if accompanyingCourse.resources|length == 0 %}
@ -247,37 +245,33 @@
<h2>{{ 'Social actions'|trans }}</h2>
<div id="accompanying_course_work_list" class="short">
{% for w in works %}
<div class="item">
<div class="title">
<p class="title_label">{{ 'accompanying_course_work.action'|trans }}</p >
<h2 class="action_title">
{{ w.socialAction|chill_entity_render_box({ 'no-badge': false }) }}
</h2>
</div>
{% for w in works %}
<div class="item">
<div class="title">
<p class="title_label">{{ 'accompanying_course_work.action'|trans }}</p >
<h2 class="action_title">
{{ w.socialAction|chill_entity_render_box({ 'no-badge': false }) }}
</h2>
</div>
<div class="actions">
<ul class="record_actions">
<li>
<a
class="btn btn-edit"
href="{{ chill_path_add_return_path('chill_person_accompanying_period_work_edit', { 'id': w.id }) }}">{{ 'Edit'|trans }}</a>
</li>
</ul>
<div class="actions">
<ul class="record_actions">
<li>
<a class="btn btn-edit"
href="{{ chill_path_add_return_path('chill_person_accompanying_period_work_edit', { 'id': w.id }) }}">{{ 'Edit'|trans }}</a>
</li>
</ul>
</div>
</div>
</div>
{% else %}
<p class="chill-no-data-statement">{{ 'accompanying_course_work.Any work'|trans }}</p>
{% endfor %}
{% else %}
<p class="chill-no-data-statement">{{ 'accompanying_course_work.Any work'|trans }}</p>
{% endfor %}
</div>
{% block contentActivity %}
{% set person = null %}
{% include 'ChillActivityBundle:Activity:list.html.twig' with {'context': 'accompanyingCourse', 'context': 'accompanyingCourse'} %}
{% include 'ChillActivityBundle:Activity:list.html.twig' with { 'context': 'accompanyingCourse' } %}
{% endblock %}
{# ==> insert accompanyingCourse vue component #}
<div id="accompanying-course"></div>
</div>
{% endblock %}