mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-30 22:16:14 +00:00
household: if no addresses, misc stuffs
This commit is contained in:
parent
96e979f92d
commit
a096266ca5
@ -1,141 +1,145 @@
|
||||
{% block content %}
|
||||
<div class="flex-table accompanyingcourse-list">
|
||||
{% for accompanying_period in accompanying_periods %}
|
||||
<div class="item-bloc">
|
||||
<div class="item-row">
|
||||
<div class="flex-table">
|
||||
{% for accompanying_period in accompanying_periods %}
|
||||
<div class="item-bloc">
|
||||
<div class="item-row">
|
||||
|
||||
<div class="item-col">
|
||||
<b>#{{ accompanying_period.id }}</b>
|
||||
{% if accompanying_period.emergency %}
|
||||
<span class="badge bg-primary">{{- 'Emergency'|trans|upper -}}</span>
|
||||
{% endif %}
|
||||
{% if accompanying_period.confidential %}
|
||||
<span class="badge bg-primary">{{- 'Confidential'|trans|upper -}}</span>
|
||||
{% endif %}
|
||||
{% if accompanying_period.step == 'DRAFT' %}
|
||||
<span class="badge bg-primary">{{- 'Draft'|trans|upper -}}</span>
|
||||
{% else %}
|
||||
<span class="badge bg-primary">{{- 'Confirmed'|trans|upper -}}</span>
|
||||
<div class="item-col">
|
||||
<b>#{{ accompanying_period.id }}</b>
|
||||
{% if accompanying_period.emergency %}
|
||||
<span class="badge bg-primary">{{- 'Emergency'|trans|upper -}}</span>
|
||||
{% endif %}
|
||||
{% if accompanying_period.confidential %}
|
||||
<span class="badge bg-primary">{{- 'Confidential'|trans|upper -}}</span>
|
||||
{% endif %}
|
||||
{% if accompanying_period.step == 'DRAFT' %}
|
||||
<span class="badge bg-primary">{{- 'Draft'|trans|upper -}}</span>
|
||||
{% else %}
|
||||
<span class="badge bg-primary">{{- 'Confirmed'|trans|upper -}}</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="item-col">
|
||||
{% if chill_accompanying_periods.fields.user == 'visible' %}
|
||||
{% if accompanying_period.user %}
|
||||
{{ accompanying_period.user.username }}
|
||||
{% else %}
|
||||
<span class="chill-no-data-statement">{{ 'No accompanying user'|trans }}</span>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="item-row">
|
||||
|
||||
<div class="item-col">
|
||||
{% if chill_accompanying_periods.fields.user == 'visible' %}
|
||||
{% if accompanying_period.user %}
|
||||
{{ accompanying_period.user.username }}
|
||||
{% if accompanying_period.closingDate == null %}
|
||||
{{ 'accompanying_period.dates_from_%opening_date%'|trans({ '%opening_date%': accompanying_period.openingDate|format_date('long') } ) }}
|
||||
{% else %}
|
||||
<span class="chill-no-data-statement">{{ 'No accompanying user'|trans }}</span>
|
||||
{{ 'accompanying_period.dates_from_%opening_date%_to_%closing_date%'|trans({
|
||||
'%opening_date%': accompanying_period.openingDate|format_date('long'),
|
||||
'%closing_date%': accompanying_period.closingDate|format_date('long')}
|
||||
) }}
|
||||
{% if accompanying_period.isOpen == false %}
|
||||
<dl class="chill_view_data">
|
||||
<dt>{{ 'Closing motive'|trans }} :</dt>
|
||||
<dd>{{ accompanying_period.closingMotive|chill_entity_render_box }}</dd>
|
||||
</dl>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
<div class="item-row">
|
||||
|
||||
</div>
|
||||
<div class="item-row">
|
||||
<div class="item-col"><h3>{{ 'Participants'|trans }}</h3></div>
|
||||
<div class="item-col">
|
||||
{% if accompanying_period.participations.count > 0 %}
|
||||
{% for p in accompanying_period.participations %}
|
||||
<p>
|
||||
<a href="{{ path('chill_person_accompanying_period_list', { person_id: p.person.id }) }}">
|
||||
{{ p.person.firstname ~ ' ' ~ p.person.lastname }}
|
||||
</a>
|
||||
</p>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<span class="chill-no-data-statement">{{ 'No data given'|trans }}</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% if accompanying_period.closingDate == null %}
|
||||
{{ 'accompanying_period.dates_from_%opening_date%'|trans({ '%opening_date%': accompanying_period.openingDate|format_date('long') } ) }}
|
||||
{% else %}
|
||||
{{ 'accompanying_period.dates_from_%opening_date%_to_%closing_date%'|trans({
|
||||
'%opening_date%': accompanying_period.openingDate|format_date('long'),
|
||||
'%closing_date%': accompanying_period.closingDate|format_date('long')}
|
||||
) }}
|
||||
{% if accompanying_period.isOpen == false %}
|
||||
<dl class="chill_view_data">
|
||||
<dt>{{ 'Closing motive'|trans }} :</dt>
|
||||
<dd>{{ accompanying_period.closingMotive|chill_entity_render_box }}</dd>
|
||||
</dl>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="item-row">
|
||||
|
||||
</div>
|
||||
<div class="item-row">
|
||||
<div class="item-col"><h3>{{ 'Requestor'|trans }}</h3></div>
|
||||
<div class="item-col">
|
||||
{% if accompanying_period.requestorPerson is not null or accompanying_period.requestorThirdParty is not null %}
|
||||
{% if accompanying_period.requestorPerson is not null %}
|
||||
<p>
|
||||
{{ accompanying_period.requestorPerson.firstname ~ ' ' ~ accompanying_period.requestorPerson.lastname }}
|
||||
</p>
|
||||
{% endif %}
|
||||
{% if accompanying_period.requestorThirdParty is not null %}
|
||||
<p>
|
||||
{{ accompanying_period.requestorThirdParty.name }}
|
||||
</p>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<span class="chill-no-data-statement">{{ 'No data given'|trans }}</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="item-col"><h3>{{ 'Participants'|trans }}</h3></div>
|
||||
<div class="item-col">
|
||||
{% if accompanying_period.participations.count > 0 %}
|
||||
{% for p in accompanying_period.participations %}
|
||||
<p>
|
||||
<a href="{{ path('chill_person_accompanying_period_list', { person_id: p.person.id }) }}">
|
||||
{{ p.person.firstname ~ ' ' ~ p.person.lastname }}
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
<div class="item-row">
|
||||
|
||||
<h3>{{ 'Social issues'|trans }}</h3>
|
||||
{% if accompanying_period.socialIssues.count > 0 %}
|
||||
{% for si in accompanying_period.socialIssues %}
|
||||
<p>{{ si.title|localize_translatable_string }}</p>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<span class="chill-no-data-statement">{{ 'No data given'|trans }}</span>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
<div class="item-row">
|
||||
|
||||
</div>
|
||||
<div class="item-row">
|
||||
<ul class="record_actions">
|
||||
|
||||
<div class="item-col"><h3>{{ 'Requestor'|trans }}</h3></div>
|
||||
<div class="item-col">
|
||||
{% if accompanying_period.requestorPerson is not null or accompanying_period.requestorThirdParty is not null %}
|
||||
{% if accompanying_period.requestorPerson is not null %}
|
||||
<p>
|
||||
{{ accompanying_period.requestorPerson.firstname ~ ' ' ~ accompanying_period.requestorPerson.lastname }}
|
||||
</p>
|
||||
{% endif %}
|
||||
{% if accompanying_period.requestorThirdParty is not null %}
|
||||
<p>
|
||||
{{ accompanying_period.requestorThirdParty.name }}
|
||||
</p>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<span class="chill-no-data-statement">{{ 'No data given'|trans }}</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="item-row">
|
||||
|
||||
<h3>{{ 'Social issues'|trans }}</h3>
|
||||
{% if accompanying_period.socialIssues.count > 0 %}
|
||||
{% for si in accompanying_period.socialIssues %}
|
||||
<p>{{ si.title|localize_translatable_string }}</p>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<span class="chill-no-data-statement">{{ 'No data given'|trans }}</span>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
<div class="item-row">
|
||||
|
||||
<ul class="record_actions">
|
||||
{# TODO if enable_accompanying_course_with_multiple_persons is true ... #}
|
||||
<li>
|
||||
<a href="{{ path('chill_person_accompanying_course_index', { 'accompanying_period_id': accompanying_period.id }) }}"
|
||||
class="btn btn-primary" title="{{ 'See accompanying period'|trans }}">
|
||||
<i class="fa fa-fw fa-random"></i>
|
||||
{{ 'See this period'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ path('chill_person_accompanying_period_update', {'person_id' : person.id, 'period_id' : accompanying_period.id } ) }}"
|
||||
class="btn btn-update" title="{{ 'Edit Accompanying Course'|trans }}"></a>
|
||||
</li>
|
||||
{% if accompanying_period.isOpen == true %}
|
||||
{# TODO if enable_accompanying_course_with_multiple_persons is true ... #}
|
||||
<li>
|
||||
<a href="{{ path('chill_person_accompanying_period_close', {'person_id' : person.id}) }}"
|
||||
class="btn btn-update change-icon">
|
||||
<i class="fa fa-fw fa-lock" aria-hidden="true"></i>
|
||||
{{'Close accompanying period'|trans }}
|
||||
<a href="{{ path('chill_person_accompanying_course_index', { 'accompanying_period_id': accompanying_period.id }) }}"
|
||||
class="btn btn-primary" title="{{ 'See accompanying period'|trans }}">
|
||||
<i class="fa fa-fw fa-random"></i>
|
||||
{{ 'See this period'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if accompanying_period.canBeReOpened(person) == true %}
|
||||
<li>
|
||||
<a href="{{ path('chill_person_accompanying_period_re_open', {'person_id' : person.id, 'period_id' : accompanying_period.id } ) }}"
|
||||
class="btn btn-create change-icon">
|
||||
<i class="fa fa-fw fa-unlock" aria-hidden="true"></i>
|
||||
{{'Re-open accompanying period'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
|
||||
{# TODO cause error in household context. only works in person context
|
||||
<li>
|
||||
<a href="{{ path('chill_person_accompanying_period_update', {'person_id' : person.id, 'period_id' : accompanying_period.id } ) }}"
|
||||
class="btn btn-update" title="{{ 'Edit Accompanying Course'|trans }}"></a>
|
||||
</li>
|
||||
{% if accompanying_period.isOpen == true %}
|
||||
<li>
|
||||
<a href="{{ path('chill_person_accompanying_period_close', {'person_id' : person.id}) }}"
|
||||
class="btn btn-update change-icon">
|
||||
<i class="fa fa-fw fa-lock" aria-hidden="true"></i>
|
||||
{{'Close accompanying period'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if accompanying_period.canBeReOpened(person) == true %}
|
||||
<li>
|
||||
<a href="{{ path('chill_person_accompanying_period_re_open', {'person_id' : person.id, 'period_id' : accompanying_period.id } ) }}"
|
||||
class="btn btn-create change-icon">
|
||||
<i class="fa fa-fw fa-unlock" aria-hidden="true"></i>
|
||||
{{'Re-open accompanying period'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
#}
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endblock content %}
|
||||
|
@ -5,24 +5,24 @@
|
||||
{% block content %}
|
||||
<div class="household-members">
|
||||
|
||||
<h1>{{ block('title') }}</h1>
|
||||
<h1>{{ block('title') }}</h1>
|
||||
|
||||
{% include 'ChillPersonBundle:AccompanyingPeriod:_list.html.twig' %}
|
||||
{% include 'ChillPersonBundle:AccompanyingPeriod:_list.html.twig' %}
|
||||
|
||||
<div class="form_control">
|
||||
<ul class="record_actions">
|
||||
<li class="cancel">
|
||||
<a href="{{ path ('chill_person_household_summary', {'household_id' : household.id } ) }}" class="btn btn-cancel">
|
||||
{{ 'Household summary'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
{#<li>
|
||||
<a href="{{ path ('chill_person_household_accompanying_course_new', {'household_id' : [ household.id ] } ) }}" class="btn btn-create">
|
||||
{{ 'Create an accompanying period'|trans }}
|
||||
</a>
|
||||
</li>#}
|
||||
</ul>
|
||||
</div>
|
||||
<ul class="record_actions">
|
||||
<li class="cancel">
|
||||
<a href="{{ path ('chill_person_household_summary', {'household_id' : household.id } ) }}" class="btn btn-cancel">
|
||||
{{ 'Household summary'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
{#
|
||||
<li>
|
||||
<a href="{{ path ('chill_person_household_accompanying_course_new', {'household_id' : [ household.id ] } ) }}" class="btn btn-create">
|
||||
{{ 'Create an accompanying period'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
#}
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
@ -7,22 +7,22 @@
|
||||
|
||||
<h1>{{ block('title') }}</h1>
|
||||
|
||||
<ul class="record_actions my-3">
|
||||
<li style="margin: auto;">
|
||||
<a class="btn btn-lg btn-create"
|
||||
href="{{ chill_path_add_return_path('chill_person_household_address_move', { 'household_id': household.id }) }}">
|
||||
{{ 'Move household'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
{% if household.addresses|length == 0 %}
|
||||
<span class="chill-no-data-statement">{{ 'No address given'|trans }}</span>
|
||||
{% else %}
|
||||
|
||||
<div class="address-timeline grid">
|
||||
<ul class="record_actions my-3">
|
||||
<li style="margin: auto;">
|
||||
<a class="btn btn-lg btn-create"
|
||||
href="{{ chill_path_add_return_path('chill_person_household_address_move', { 'household_id': household.id }) }}">
|
||||
{{ 'Move household'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
{% if household.addresses|length == 0 %}
|
||||
<span class="chill-no-data-statement">{{ 'No address given'|trans }}</span>
|
||||
{% else %}
|
||||
<div class="top"><i class="fa fa-caret-up fa-3x"></i></div>
|
||||
{% endif %}
|
||||
<div class="address-timeline grid">
|
||||
|
||||
<div class="top"><i class="fa fa-caret-up fa-3x"></i></div>
|
||||
|
||||
{% set row = 0 %}
|
||||
{% set previousRowFrom = null %}
|
||||
@ -68,6 +68,7 @@
|
||||
{% set previousRowFrom = address.validFrom %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<ul class="record_actions sticky-form-buttons">
|
||||
<li class="cancel">
|
||||
|
Loading…
x
Reference in New Issue
Block a user