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