mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
Merge remote-tracking branch 'origin/master' into HEAD
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
{% extends '@ChillPerson/AccompanyingCourse/layout.html.twig' %}
|
||||
|
||||
{% block title %}
|
||||
{{ 'Accompanying Course Details'|trans }}
|
||||
{{ 'Accompanying Course History'|trans }}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
@@ -15,8 +15,8 @@
|
||||
Il faudrait peut-être modifier son adresse comme ceci: `/fr/parcours/{id}/timeline`
|
||||
</p>
|
||||
|
||||
{# start test flex-table
|
||||
|
||||
{# start test flex-table
|
||||
|
||||
<div class="flex-table">
|
||||
{% for p in accompanyingCourse.participations %}
|
||||
<div class="item-bloc">
|
||||
@@ -52,16 +52,16 @@
|
||||
<li><button type="button" class="btn btn-edit"></button></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="item-row">
|
||||
Lorem ipsum dolor sit amet, incididunt ut labore et dolore magna aliqua.
|
||||
Lorem ipsum dolor sit amet, incididunt ut labore et dolore magna aliqua.
|
||||
</div>
|
||||
<div class="item-row">
|
||||
Rhoncus est pellentesque elit eu ultrices vitae auctor.
|
||||
Rhoncus est pellentesque elit eu ultrices vitae auctor.
|
||||
</div>
|
||||
<div class="item-row">
|
||||
Facilisis gravida neque convallis a cras semper auctor neque.
|
||||
Facilisis gravida neque convallis a cras semper auctor neque.
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
@@ -70,5 +70,5 @@
|
||||
{# end test flex-table #}
|
||||
|
||||
{# ==> insert accompanyingCourse vue component #}
|
||||
<div id="accompanying-course"></div>
|
||||
<div id="accompanying-course"></div>
|
||||
{% endblock %}
|
||||
|
@@ -34,6 +34,9 @@
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<pre>WIP .. AccompanyingCourse Resume dashboard</pre>
|
||||
|
||||
{#
|
||||
<h1>{{ 'Resume Accompanying Course'|trans }}</h1>
|
||||
|
||||
<div class="associated-persons mb-5">
|
||||
@@ -50,11 +53,13 @@
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
#}
|
||||
{% if 'DRAFT' != accompanyingCourse.step %}
|
||||
{% if withoutHousehold|length > 0 %}
|
||||
{% include '@ChillPerson/AccompanyingCourse/_join_household.html.twig' with {} %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{#
|
||||
</div>
|
||||
|
||||
<div class="location mb-5">
|
||||
@@ -75,12 +80,11 @@
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
#}
|
||||
{% if accompanyingCourse.locationStatus == 'address' or accompanyingCourse.locationStatus == 'none' %}
|
||||
{% include '@ChillPerson/AccompanyingCourse/_warning_address.html.twig' with {} %}
|
||||
{% endif %}
|
||||
|
||||
|
||||
{#
|
||||
</div>
|
||||
|
||||
<div class="requestor mb-5">
|
||||
@@ -128,6 +132,8 @@
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
#}
|
||||
<div class="mt-5"></div>
|
||||
|
||||
<div class="social-actions mb-5">
|
||||
<h2 class="mb-3">{{ 'Social actions'|trans }}</h2>
|
||||
|
@@ -1,72 +0,0 @@
|
||||
{#
|
||||
This Twig template include load vue_address component.
|
||||
It push all variables from context in Address/App.vue.
|
||||
|
||||
OPTIONS
|
||||
* mode string ['edit*'|'new'|'create']
|
||||
* address_id integer
|
||||
* backUrl twig route: path('route', {parameters})
|
||||
* modalTitle twig translated chain
|
||||
* buttonText twig translated chain
|
||||
* buttonSize bootstrap class like 'btn-sm'
|
||||
|
||||
#}
|
||||
<div id="address"></div>
|
||||
|
||||
<script type="text/javascript">
|
||||
window.vueRootComponent = 'app';
|
||||
|
||||
{% if person is defined %}
|
||||
window.entityType = 'person';
|
||||
window.entityId = {{ person.id|e('js') }};
|
||||
{% elseif household is defined %}
|
||||
window.entityType = 'household';
|
||||
window.entityId = {{ household.id|e('js') }};
|
||||
{% endif %}
|
||||
|
||||
{% if 'edit' in app.request.get('_route') %}
|
||||
window.addressId = {{ app.request.get('address_id')|e('js') }};
|
||||
window.mode = 'edit';
|
||||
{% elseif mode is defined and mode == 'edit' %}
|
||||
window.addressId = {{ address_id|e('js') }};
|
||||
window.mode = 'edit';
|
||||
{% endif %}
|
||||
|
||||
{% if backUrl is not defined %}
|
||||
{% if person is defined %}
|
||||
window.backUrl = '{{ path('chill_person_address_list', { 'person_id': person.id })|e('js') }}';
|
||||
{% elseif household is defined %}
|
||||
window.backUrl = '{{ path('chill_person_household_addresses', { 'household_id': household.id })|e('js') }}';
|
||||
{% endif %}
|
||||
{% else %}
|
||||
window.backUrl = '{{ backUrl|e('js') }}';
|
||||
{% endif %}
|
||||
|
||||
{% if modalTitle is defined %}
|
||||
window.modalTitle = '{{ modalTitle|trans|e('js') }}';
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% if buttonText is defined %}
|
||||
window.buttonText = '{{ buttonText|trans|e('js') }}';
|
||||
{% endif %}
|
||||
|
||||
{% if buttonSize is defined %}
|
||||
window.buttonSize = '{{ buttonSize|e('js') }}';
|
||||
{% endif %}
|
||||
|
||||
{% if buttonDisplayText is defined and buttonDisplayText == false %}
|
||||
window.buttonDisplayText = false;
|
||||
{% endif %}
|
||||
|
||||
{% if binModalStep1 is defined and binModalStep1 == false %}
|
||||
window.binModalStep1 = false;
|
||||
{% endif %}
|
||||
|
||||
{% if binModalStep2 is defined and binModalStep2 == false %}
|
||||
window.binModalStep2 = false;
|
||||
{% endif %}
|
||||
</script>
|
||||
|
||||
{{ encore_entry_script_tags('vue_address') }}
|
||||
{{ encore_entry_link_tags('vue_address') }}
|
@@ -27,10 +27,15 @@
|
||||
<h1>{{ block('title') }}</h1>
|
||||
|
||||
{# include vue_address component #}
|
||||
{% include '@ChillPerson/Address/_insert_vue_address.html.twig' with {
|
||||
binModalStep1: false,
|
||||
binModalStep2: false,
|
||||
{% include '@ChillMain/Address/_insert_vue_address.html.twig' with {
|
||||
targetEntity: { name: 'person', id: person.id },
|
||||
backUrl: path('chill_person_address_list', { 'person_id': person.id }),
|
||||
openPanesInModal: false,
|
||||
stickyActions: true,
|
||||
useValidFrom: true,
|
||||
} %}
|
||||
{#
|
||||
#}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
|
@@ -29,7 +29,9 @@
|
||||
<li style="margin: auto;">
|
||||
|
||||
{# include vue_address component #}
|
||||
{% include '@ChillPerson/Address/_insert_vue_address.html.twig' with {
|
||||
{% include '@ChillMain/Address/_insert_vue_address.html.twig' with {
|
||||
targetEntity: { name: 'person', id: person.id },
|
||||
backUrl: path('chill_person_address_list', { 'person_id': person.id }),
|
||||
mode: 'new',
|
||||
buttonSize: 'btn-lg',
|
||||
buttonText: 'Add an address',
|
||||
@@ -64,28 +66,30 @@
|
||||
{% if address.validTo is not empty and address.validTo < previousRowFrom %}
|
||||
<div class="{{ 'row' ~ row ~ ' ' }}col-a action">
|
||||
|
||||
{# include vue_address component #}
|
||||
<a href="" class="btn btn-sm btn-create">{{ 'Insert an address'|trans }}</a></div>
|
||||
{# include vue_address component #}
|
||||
{#
|
||||
{% include '@ChillPerson/Address/_insert_vue_address.html.twig' with {
|
||||
address_id: address.id,
|
||||
{% include '@ChillMain/Address/_insert_vue_address.html.twig' with {
|
||||
targetEntity: { name: 'person', id: person.id },
|
||||
backUrl: path('chill_person_address_list', { 'person_id': person.id }),
|
||||
mode: 'edit',
|
||||
binModalStep1: false,
|
||||
binModalStep2: false,
|
||||
addressId: address.id,
|
||||
openPanesInModal: false,
|
||||
} %}
|
||||
#}
|
||||
|
||||
<div class="{{ 'row' ~ row ~ ' ' }}col-b"></div>
|
||||
<div class="{{ 'row' ~ row ~ ' ' }}col-c action">
|
||||
|
||||
{# include vue_address component #}
|
||||
<a href="" class="btn btn-sm btn-create">{{ 'Insert an address'|trans }}</a></div>
|
||||
{# include vue_address component #}
|
||||
{#
|
||||
{% include '@ChillPerson/Address/_insert_vue_address.html.twig' with {
|
||||
address_id: address.id,
|
||||
{% include '@ChillMain/Address/_insert_vue_address.html.twig' with {
|
||||
targetEntity: { name: 'person', id: person.id },
|
||||
backUrl: path('chill_person_address_list', { 'person_id': person.id }),
|
||||
mode: 'edit',
|
||||
binModalStep1: false,
|
||||
binModalStep2: false,
|
||||
addressId: address.id,
|
||||
openPanesInModal: false,
|
||||
} %}
|
||||
#}
|
||||
|
||||
@@ -109,7 +113,6 @@
|
||||
}) }}
|
||||
<ul class="record_actions">
|
||||
|
||||
{# include vue_address component #}
|
||||
<li><a href="{{ path('chill_person_address_edit', { 'person_id': person.id, 'address_id' : address.id } ) }}" class="btn btn-edit"></a></li>
|
||||
|
||||
</ul>
|
||||
@@ -160,7 +163,6 @@
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
{# include vue_address component #}
|
||||
<a class="btn btn-create"
|
||||
href="{{ path('chill_person_address_new', { 'person_id' : person.id } ) }}">
|
||||
{{ 'Add an address'|trans }}
|
||||
|
@@ -27,10 +27,16 @@
|
||||
<h1>{{ block('title') }}</h1>
|
||||
|
||||
{# include vue_address component #}
|
||||
{% include '@ChillPerson/Address/_insert_vue_address.html.twig' with {
|
||||
binModalStep1: false,
|
||||
binModalStep2: false,
|
||||
{% include '@ChillMain/Address/_insert_vue_address.html.twig' with {
|
||||
targetEntity: { name: 'person', id: person.id },
|
||||
backUrl: path('chill_person_address_list', { 'person_id': person.id }),
|
||||
openPanesInModal: false,
|
||||
stickyActions: true,
|
||||
useValidFrom: true,
|
||||
} %}
|
||||
{#
|
||||
useValidTo: true,
|
||||
#}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
|
@@ -16,6 +16,10 @@
|
||||
'replace' Twig\Markup,
|
||||
'after' Twig\Markup
|
||||
]
|
||||
* customArea [
|
||||
'beforeLabel' Twig\Markup,
|
||||
'afterLabel' Twig\Markup,
|
||||
]
|
||||
#}
|
||||
|
||||
{% macro raw(person, options) %}
|
||||
@@ -37,11 +41,22 @@
|
||||
<div class="denomination {{ 'h' ~ options['hLevel'] }}">
|
||||
{%- if options['addLink'] and is_granted('CHILL_PERSON_SEE', person) -%}
|
||||
<a href="{{ chill_path_add_return_path('chill_person_view', { 'person_id': person.id }) }}">
|
||||
{{ _self.raw(person, options) }}
|
||||
</a>
|
||||
{%- else -%}
|
||||
{{ _self.raw(person, options) }}
|
||||
{%- endif -%}
|
||||
|
||||
{% if options['customArea']['beforeLabel'] is defined %}
|
||||
{{ options['customArea']['beforeLabel'] }}
|
||||
{% endif %}
|
||||
|
||||
{{ _self.raw(person, options) }}
|
||||
|
||||
{% if options['customArea']['afterLabel'] is defined %}
|
||||
{{ options['customArea']['afterLabel'] }}
|
||||
{% endif %}
|
||||
|
||||
{%- if options['addLink'] and is_granted('CHILL_PERSON_SEE', person) -%}
|
||||
</a>
|
||||
{%- endif -%}
|
||||
|
||||
{%- if options['addEntity'] -%}
|
||||
<span class="badge rounded-pill bg-secondary">{{ 'Person'|trans }}</span>
|
||||
{%- endif -%}
|
||||
@@ -131,10 +146,10 @@
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</li>
|
||||
{% if options['addCenter'] %}
|
||||
{% if options['addCenter'] and person|chill_resolve_center is not null %}
|
||||
<li>
|
||||
<i class="fa fa-li fa-long-arrow-right"></i>
|
||||
{{ person.center }}
|
||||
{{ person|chill_resolve_center.name }}
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
|
@@ -4,7 +4,8 @@
|
||||
|
||||
{% block content %}
|
||||
|
||||
<h1>{{ block('title') }}</h1>
|
||||
<h1>{{ member.person|chill_entity_render_string }}</h1>
|
||||
<h2 class="mb-5">{{ 'household.Edit his household'|trans }}</h2>
|
||||
|
||||
{{ form_start(form) }}
|
||||
{{ form_widget(form) }}
|
||||
|
@@ -0,0 +1,65 @@
|
||||
{% macro addHolder(holder) %}
|
||||
{% if holder %}
|
||||
<span class="fa-stack fa-holder" title="{{ 'household.holder'|trans }}">
|
||||
<i class="fa fa-circle fa-stack-1x text-success"></i>
|
||||
<i class="fa fa-stack-1x">T</i>
|
||||
</span>
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
|
||||
<div class="item-bloc">
|
||||
<div class="item-row">
|
||||
<div class="item-col" style="flex-basis: 30%;">
|
||||
{{ member.person|chill_entity_render_box({
|
||||
'render': 'label',
|
||||
'addLink': true,
|
||||
'addInfo': true,
|
||||
'customArea': {
|
||||
'afterLabel': _self.addHolder(member.holder)
|
||||
}
|
||||
}) }}
|
||||
</div>
|
||||
<div class="item-col">
|
||||
<div class="float-button top"><div class="box">
|
||||
|
||||
<div class="action">
|
||||
<ul class="record_actions">
|
||||
|
||||
{% if customButtons['before'] is defined %}
|
||||
{{ customButtons['before'] }}
|
||||
{% endif %}
|
||||
|
||||
<li>
|
||||
<a class="btn btn-sm btn-edit"
|
||||
title="{{ 'household.Edit member household'|trans }}"
|
||||
href="{{ chill_path_add_return_path('chill_person_household_member_edit', { 'id': member.id }) }}"></a>
|
||||
</li>
|
||||
|
||||
{% if customButtons['after'] is defined %}
|
||||
{{ customButtons['after'] }}
|
||||
{% endif %}
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<ul class="list-content fa-ul small ms-0">
|
||||
{% if member.startDate is not empty %}
|
||||
<li><i class="fa fa-long-arrow-right"></i>
|
||||
{{ 'Since %date%'|trans({'%date%': member.startDate|format_date('short') }) }}</li>
|
||||
{% endif %}
|
||||
{% if member.endDate is not empty %}
|
||||
<li><i class="fa fa-long-arrow-right"></i>
|
||||
{{ 'Until %date%'|trans({'%date%': member.endDate|format_date('short') }) }}</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
|
||||
{% if member.comment is not empty %}
|
||||
<blockquote class="chill-user-quote ms-0 mb-0" style="clear: right">
|
||||
{{ member.comment|chill_markdown_to_html }}
|
||||
</blockquote>
|
||||
{% endif %}
|
||||
|
||||
</div></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@@ -7,9 +7,12 @@
|
||||
|
||||
<div>
|
||||
{# include vue_address component #}
|
||||
{% include '@ChillPerson/Address/_insert_vue_address.html.twig' with {
|
||||
binModalStep1: false,
|
||||
binModalStep2: false,
|
||||
{% include '@ChillMain/Address/_insert_vue_address.html.twig' with {
|
||||
targetEntity: { name: 'household', id: household.id },
|
||||
backUrl: path('chill_person_household_addresses', { 'household_id': household.id }),
|
||||
openPanesInModal: false,
|
||||
stickyActions: true,
|
||||
useValidFrom: true,
|
||||
} %}
|
||||
</div>
|
||||
|
||||
|
@@ -7,10 +7,15 @@
|
||||
|
||||
<div>
|
||||
{# include vue_address component #}
|
||||
{% include '@ChillPerson/Address/_insert_vue_address.html.twig' with {
|
||||
binModalStep1: false,
|
||||
binModalStep2: false,
|
||||
{% include '@ChillMain/Address/_insert_vue_address.html.twig' with {
|
||||
targetEntity: { name: 'household', id: household.id },
|
||||
backUrl: path('chill_person_household_addresses', { 'household_id': household.id }),
|
||||
openPanesInModal: false,
|
||||
stickyActions: true,
|
||||
useValidFrom: true,
|
||||
} %}
|
||||
{#
|
||||
#}
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
|
@@ -15,13 +15,17 @@
|
||||
<li style="margin: auto;">
|
||||
|
||||
{# include vue_address component #}
|
||||
{% include '@ChillPerson/Address/_insert_vue_address.html.twig' with {
|
||||
{% include '@ChillMain/Address/_insert_vue_address.html.twig' with {
|
||||
targetEntity: { name: 'household', id: household.id },
|
||||
backUrl: path('chill_person_household_addresses', { 'household_id': household.id }),
|
||||
mode: 'new',
|
||||
backUrl: chill_path_add_return_path('chill_person_household_address_move', { 'household_id': household.id }),
|
||||
buttonSize: 'btn-lg',
|
||||
buttonText: 'Move household',
|
||||
modalTitle: 'Move household',
|
||||
} %}
|
||||
{#
|
||||
useValidFrom: true,
|
||||
#}
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
@@ -41,7 +45,6 @@
|
||||
<div class="{{ 'row' ~ row ~ ' ' }}col-b"></div>
|
||||
<div class="{{ 'row' ~ row ~ ' ' }}col-c action">
|
||||
|
||||
{# include vue_address component #}
|
||||
<a href="" class="btn btn-sm btn-create">{{ 'Insert an address'|trans }}</a></div>
|
||||
|
||||
<div class="date">
|
||||
@@ -63,8 +66,6 @@
|
||||
}) }}
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
|
||||
{# include vue_address component #}
|
||||
<a href="{{ path('chill_person_household_address_edit', { 'household_id': household.id, 'address_id' : address.id } ) }}"
|
||||
class="btn btn-edit"></a>
|
||||
|
||||
@@ -91,7 +92,6 @@
|
||||
</li>
|
||||
<li>
|
||||
|
||||
{# include vue_address component #}
|
||||
<a class="btn btn-create"
|
||||
href="{{ chill_path_add_return_path('chill_person_household_address_move', { 'household_id': household.id }) }}">
|
||||
{{ 'Move household'|trans }}
|
||||
|
@@ -20,24 +20,21 @@
|
||||
<i class="fa fa-fw fa-users" title="{{- 'household.Current household members'|trans }}"></i>
|
||||
</span>
|
||||
|
||||
{%- for m in members|slice(0, 5) -%}
|
||||
{%- for m in members -%}
|
||||
<span
|
||||
class="badge-member{%- if m.holder %} holder{% endif -%}{%- if m.position.ordering >= 2 %} child{% endif -%}"
|
||||
title="{{ m.position.label.fr }}">
|
||||
{%- if m.holder %}
|
||||
<span class="badge bg-chill-light-gray text-chill-gray">
|
||||
{{ 'household.holder'|trans }}
|
||||
</span>
|
||||
{% endif -%}
|
||||
{{- m.person|chill_entity_render_box({'addLink': false}) -}}
|
||||
<a href="{{ path('chill_person_view', { person_id: m.person.id}) }}">
|
||||
{%- if m.holder %}
|
||||
<span class="fa-stack fa-holder" title="{{ 'household.holder'|trans }}">
|
||||
<i class="fa fa-circle fa-stack-1x text-success"></i>
|
||||
<i class="fa fa-stack-1x">T</i>
|
||||
</span>
|
||||
{% endif -%}
|
||||
{{- m.person|chill_entity_render_box() -}}
|
||||
</a>
|
||||
</span>
|
||||
{%- endfor -%}
|
||||
|
||||
{% if members|length > 5 %}
|
||||
<span class="current-members-more">
|
||||
{{ 'household.and x other persons'|trans({'x': members|length-5}) }}
|
||||
</span>
|
||||
{% endif %}
|
||||
{%- endif -%}
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -17,4 +17,8 @@
|
||||
'layout': '@ChillPerson/menu.html.twig',
|
||||
'args' : { 'household': household }
|
||||
}) }}
|
||||
|
||||
{% block block_post_menu %}
|
||||
{% endblock %}
|
||||
|
||||
{% endblock %}
|
||||
|
@@ -4,7 +4,7 @@
|
||||
{% block title 'household.Edit household members'|trans %}
|
||||
|
||||
{% block content %}
|
||||
<div class="col-md-10 col-xxl household-members">
|
||||
<div class="household-members">
|
||||
|
||||
<h1>{{ block('title') }}</h1>
|
||||
<div id="household_members_editor"></div>
|
||||
@@ -22,5 +22,6 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block css %}
|
||||
{{ encore_entry_link_tags('vue_household_members_editor') }}
|
||||
{{ parent() }}
|
||||
{{ encore_entry_link_tags('vue_household_members_editor') }}
|
||||
{% endblock %}
|
||||
|
@@ -2,213 +2,196 @@
|
||||
|
||||
{% block title 'household.Household summary'|trans %}
|
||||
|
||||
{% block block_post_menu %}
|
||||
<div class="block-post-menu"></div>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="household-summary">
|
||||
|
||||
<h1>{{ block('title') }}</h1>
|
||||
{#
|
||||
<h1>{{ block('title') }}</h1>
|
||||
<h2>{{ 'household.Current address'|trans }}</h2>
|
||||
#}
|
||||
|
||||
<h2>{{ 'household.Current address'|trans }}</h2>
|
||||
{% set address = household.currentAddress %}
|
||||
|
||||
{% set address = household.currentAddress %}
|
||||
<div class="row household-resume">
|
||||
<div class="item-bloc col-5 col-address">
|
||||
<h2>{{ 'Address'|trans }}</h2>
|
||||
|
||||
{% if address is empty %}
|
||||
<p class="chill-no-data-statement">{{ 'household.Household does not have any address currently'|trans }}</p>
|
||||
{% else %}
|
||||
<div>
|
||||
{{ address|chill_entity_render_box({'multiline': true}) }}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<h2>{{ 'household.Household members'|trans }}</h2>
|
||||
|
||||
{% if form is not null %}
|
||||
{{ form_start(form) }}
|
||||
|
||||
{{ form_row(form.commentMembers) }}
|
||||
|
||||
<div id="waitingForBirthContainer">
|
||||
{{ form_row(form.waitingForBirth) }}
|
||||
</div>
|
||||
|
||||
<div id="waitingForBirthDateContainer">
|
||||
{{ form_row(form.waitingForBirthDate) }}
|
||||
</div>
|
||||
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<button type="submit" class="btn btn-save">
|
||||
{{ 'Save'|trans }}
|
||||
</button>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
{{ form_end(form) }}
|
||||
{% else %}
|
||||
|
||||
{% if not household.commentMembers.isEmpty() %}
|
||||
{{ household.commentMembers|chill_entity_render_box }}
|
||||
{% endif %}
|
||||
|
||||
{% if household.waitingForBirth %}
|
||||
{% if household.waitingForBirthDate is not null %}
|
||||
{{ 'household.Expecting for birth on date'|trans({ 'date': household.waitingForBirthDate|format_date('long') }) }}
|
||||
{% else %}
|
||||
{{ 'household.Expecting for birth'|trans }}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<p class="chill-no-data-statement">
|
||||
{{ 'household.Any expecting birth'|trans }}
|
||||
</p>
|
||||
{% endif %}
|
||||
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a href="{{ chill_path_add_return_path('chill_person_household_summary', { 'household_id': household.id, 'edit': 1 }) }}"
|
||||
class="btn btn-edit">
|
||||
{{ 'household.Comment and expecting birth'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% for p in positions %}
|
||||
<h3>{{ p.label|localize_translatable_string }}</h3>
|
||||
|
||||
{% if false == p.shareHousehold %}
|
||||
<p>{{ 'household.Those members does not share address'|trans }}</p>
|
||||
{% endif %}
|
||||
|
||||
{%- set members = household.currentMembersByPosition(p) %}
|
||||
{% if members|length > 0 %}
|
||||
<div class="flex-table list-household-members">
|
||||
{% for m in members %}
|
||||
<div class="item-bloc">
|
||||
<div class="item-row">
|
||||
<div class="item-col">
|
||||
<div>
|
||||
{{ m.person|chill_entity_render_box({'addLink': true}) }}
|
||||
{% if m.holder %}
|
||||
<span class="badge bg-primary">{{ 'household.holder'|trans }}</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div>
|
||||
{{ 'Born the date'|trans({ 'gender': m.person.gender, 'birthdate': m.person.birthdate|format_date('long') }) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="item-col">
|
||||
<ul class="list-content fa-ul">
|
||||
{% if m.startDate is not empty %}
|
||||
<li>{{ 'Since %date%'|trans({'%date%': m.startDate|format_date('long') }) }}</li>
|
||||
{% endif %}
|
||||
{% if m.endDate is not empty %}
|
||||
<li>{{ 'Until %date%'|trans({'%date%': m.endDate|format_date('long') }) }}</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a href="{{ chill_path_add_return_path('chill_person_household_member_edit', { 'id': m.id }) }}"
|
||||
class="btn btn-edit" />
|
||||
{{ 'household.Update membership'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ chill_path_add_return_path('chill_person_household_members_editor', {'persons': [ m.person.id ], 'household': household.id} ) }}"
|
||||
class="btn btn-misc" />
|
||||
<i class="fa fa-arrows-h"></i>
|
||||
{{ 'household.Change position'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ chill_path_add_return_path('chill_person_household_members_editor', {'persons': [ m.person.id ], 'allow_leave_without_household': true } ) }}"
|
||||
class="btn btn-misc" />
|
||||
<i class="fa fa-sign-out"></i>
|
||||
{{ 'household.Leave'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
{% if m.comment is not empty %}
|
||||
<div class="item-row comment">
|
||||
<blockquote class="chill-user-quote">
|
||||
{{ m.comment|chill_markdown_to_html }}
|
||||
</blockquote>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% else %}
|
||||
<p class="chill-no-data-statement">{{ 'household.Any persons into this position'|trans }}</p>
|
||||
{% endif %}
|
||||
|
||||
{% set members = household.nonCurrentMembersByPosition(p) %}
|
||||
{% if members|length > 0 %}
|
||||
<p><!-- force a space after table --></p>
|
||||
<button class="btn btn-green" type="button" data-bs-toggle="collapse" data-bs-target="#nonCurrent_{{ p.id }}" aria-expanded="false" aria-controls="collapse non current members">
|
||||
{{ 'household.Show future or past memberships'|trans({'length': members|length}) }}
|
||||
</button>
|
||||
|
||||
<div id="nonCurrent_{{ p.id }}" class="collapse">
|
||||
<div class="flex-table list-household-members">
|
||||
{% for m in members %}
|
||||
<div class="item-bloc">
|
||||
<div class="item-row">
|
||||
<div class="item-col">
|
||||
<div>
|
||||
{{ m.person|chill_entity_render_box({'addLink': true}) }}
|
||||
{% if m.holder %}
|
||||
<span class="badge bg-primary">{{ 'household.holder'|trans }}</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div>
|
||||
{{ 'Born the date'|trans({ 'gender': m.person.gender, 'birthdate': m.person.birthdate|format_date('long') }) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="item-col">
|
||||
<ul class="list-content fa-ul">
|
||||
{% if m.startDate is not empty %}
|
||||
<li>{{ 'Since %date%'|trans({'%date%': m.startDate|format_date('long') }) }}</li>
|
||||
{% endif %}
|
||||
{% if m.endDate is not empty %}
|
||||
<li>{{ 'Until %date%'|trans({'%date%': m.endDate|format_date('long') }) }}</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a href="{{ chill_path_add_return_path('chill_person_household_member_edit', { 'id': m.id }) }}"
|
||||
class="btn btn-edit">
|
||||
{{ 'household.Update membership'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
{% if m.comment is not empty %}
|
||||
<div class="item-row comment">
|
||||
<blockquote class="chill-user-quote">
|
||||
{{ m.comment|chill_markdown_to_html }}
|
||||
</blockquote>
|
||||
</div>
|
||||
{% if address is empty %}
|
||||
<p class="chill-no-data-statement">{{ 'household.Household does not have any address currently'|trans }}</p>
|
||||
{% else %}
|
||||
{{ address|chill_entity_render_box({'multiline': true, 'extended_infos': true }) }}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
<ul class="list-inline text-right mt-2">
|
||||
<li class="list-inline-item">
|
||||
{# include vue_address component #}
|
||||
{% include '@ChillMain/Address/_insert_vue_address.html.twig' with {
|
||||
targetEntity: { name: 'household', id: household.id },
|
||||
backUrl: path('chill_person_household_summary', { 'household_id': household.id }),
|
||||
hideAddress: true,
|
||||
mode: 'new',
|
||||
buttonSize: 'btn-sm',
|
||||
buttonText: 'Move household',
|
||||
modalTitle: 'Move household',
|
||||
buttonDisplayText: false,
|
||||
} %}
|
||||
</li>
|
||||
<li class="list-inline-item">
|
||||
<a class="btn btn-secondary btn-sm" title="{{ "Addresses history"|trans }}"
|
||||
href="{{ path('chill_person_household_addresses', { 'household_id': household.id } ) }}">
|
||||
<i class="fa fa-list fa-fw"></i>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
{% if address is not empty %}
|
||||
<div class="item-bloc col-7 col-comment">
|
||||
{% if form is null %}
|
||||
|
||||
{% if household.waitingForBirth or not household.commentMembers.isEmpty() %}
|
||||
<div class="p-4 bg-light">
|
||||
{% if household.waitingForBirth %}
|
||||
<i class="fa fa-check-square-o pe-2"></i>
|
||||
{% if household.waitingForBirthDate is not null %}
|
||||
{{ 'household.Expecting for birth on date'|trans({ 'date': household.waitingForBirthDate|format_date('long') }) }}
|
||||
{% else %}
|
||||
{{ 'household.Expecting for birth'|trans }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if not household.commentMembers.isEmpty() %}
|
||||
{{ household.commentMembers|chill_entity_render_box }}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if not household.commentMembers.isEmpty() %}
|
||||
<a href="{{ chill_path_add_return_path('chill_person_household_summary', { 'household_id': household.id, 'edit': 1 }) }}"
|
||||
class="btn btn-edit btn-block">
|
||||
{{ 'household.Edit comment and expecting birth'|trans }}
|
||||
</a>
|
||||
{% else %}
|
||||
<a href="{{ chill_path_add_return_path('chill_person_household_summary', { 'household_id': household.id, 'edit': 1 }) }}"
|
||||
class="btn btn-create btn-block">
|
||||
{{ 'household.New comment and expecting birth'|trans }}
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
{% else %}
|
||||
|
||||
{{ form_start(form) }}
|
||||
<div id="waitingForBirthContainer">
|
||||
{{ form_widget(form.waitingForBirth) }}
|
||||
</div>
|
||||
<div id="waitingForBirthDateContainer">
|
||||
{{ form_widget(form.waitingForBirthDate) }}
|
||||
</div>
|
||||
<div class="mt-3">
|
||||
{{ form_widget(form.commentMembers) }}
|
||||
</div>
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<button type="submit" class="btn btn-save">
|
||||
{{ 'Save'|trans }}
|
||||
</button>
|
||||
</li>
|
||||
</ul>
|
||||
{{ form_end(form) }}
|
||||
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
<h2 class="my-5">{{ 'household.Household members'|trans }}</h2>
|
||||
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a href="{{ chill_path_add_return_path('chill_person_household_members_editor', {'household': household.id }) }}"
|
||||
class="btn btn-create">
|
||||
{{ 'household.Add a member'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
{% for p in positions %}
|
||||
<div class="mb-5">
|
||||
<h3>{{ p.label|localize_translatable_string }}
|
||||
{% if false == p.shareHousehold %}
|
||||
<i class="chill-help-tooltip" data-bs-toggle="tooltip" data-bs-placement="top" data-bs-html="true"
|
||||
title="{{ 'household.Those members does not share address'|trans }}"></i>
|
||||
{% endif %}
|
||||
</h3>
|
||||
|
||||
{%- set members = household.currentMembersByPosition(p) %}
|
||||
|
||||
{% macro customButtons(member, household) %}
|
||||
<li>
|
||||
<a href="{{ chill_path_add_return_path('chill_person_household_members_editor', {'persons': [ member.person.id ], 'allow_leave_without_household': true } ) }}"
|
||||
class="btn btn-sm btn-unlink" title="{{ 'household.person.leave'|trans }}"></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ chill_path_add_return_path('chill_person_household_members_editor', {'persons': [ member.person.id ], 'household': household.id} ) }}"
|
||||
class="btn btn-sm btn-misc" title="{{ 'household.Change position'|trans }}"><i class="fa fa-arrows-h"></i></a>
|
||||
</li>
|
||||
{% endmacro %}
|
||||
|
||||
{% if members|length > 0 %}
|
||||
<div class="flex-table list-household-members">
|
||||
{% for m in members %}
|
||||
{% include '@ChillPerson/Household/_render_member.html.twig' with {
|
||||
'member': m,
|
||||
'customButtons': { 'after': _self.customButtons(m, household) }
|
||||
} %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% else %}
|
||||
<p class="chill-no-data-statement">{{ 'household.Any persons into this position'|trans }}</p>
|
||||
{% endif %}
|
||||
|
||||
{% set members = household.nonCurrentMembersByPosition(p) %}
|
||||
{% if members|length > 0 %}
|
||||
|
||||
<style>
|
||||
button[aria-expanded="true"] > span.folded,
|
||||
button[aria-expanded="false"] > span.unfolded { display: none; }
|
||||
button[aria-expanded="false"] > span.folded,
|
||||
button[aria-expanded="true"] > span.unfolded { display: inline; }
|
||||
</style>
|
||||
<div class="accordion" id="nonCurrent">
|
||||
<div class="accordion-item">
|
||||
<h2 class="accordion-header" id="heading_{{ p.id }}">
|
||||
<button
|
||||
class="accordion-button collapsed"
|
||||
type="button"
|
||||
data-bs-toggle="collapse"
|
||||
data-bs-target="#collapse_{{ p.id }}"
|
||||
aria-expanded="false"
|
||||
aria-controls="collapse_{{ p.id }}">
|
||||
<span class="folded">{{ 'household.Show future or past memberships'|trans({'length': members|length}) }}</span>
|
||||
<span class="unfolded text-secondary">{{ 'household.Hide memberships'|trans }}</span>
|
||||
</button>
|
||||
</h2>
|
||||
<div id="collapse_{{ p.id }}"
|
||||
class="accordion-collapse collapse"
|
||||
aria-labelledby="heading_{{ p.id }}"
|
||||
data-bs-parent="#nonCurrent">
|
||||
<div class="flex-table my-0 list-household-members">
|
||||
{% for m in members %}
|
||||
{% include '@ChillPerson/Household/_render_member.html.twig' with { 'member': m } %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a href="{{ chill_path_add_return_path('chill_person_household_members_editor', {'household': household.id }) }}"
|
||||
class="btn btn-create">
|
||||
{{ 'household.Add a member'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
@@ -17,11 +17,11 @@
|
||||
{%- endif -%}
|
||||
</div>
|
||||
<div class="text-md-end">
|
||||
{%- if chill_person.fields.spoken_languages == 'visible' -%}
|
||||
{% if person|chill_resolve_center is not null%}
|
||||
<span class="open_sansbold">
|
||||
{{ 'Center'|trans|upper}} :
|
||||
</span>
|
||||
{{ person.center.name|upper }}
|
||||
{{ person|chill_resolve_center.name|upper }}
|
||||
{%- endif -%}
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -64,10 +64,10 @@
|
||||
{{ form_start(form) }}
|
||||
|
||||
|
||||
{{ form_row(form.firstName, { 'label' : 'First name'|trans }) }}
|
||||
|
||||
{{ form_row(form.lastName, { 'label' : 'Last name'|trans }) }}
|
||||
|
||||
{{ form_row(form.firstName, { 'label' : 'First name'|trans }) }}
|
||||
|
||||
{% if form.altNames is defined %}
|
||||
{{ form_widget(form.altNames) }}
|
||||
{% endif %}
|
||||
@@ -76,12 +76,27 @@
|
||||
|
||||
{{ form_row(form.gender, { 'label' : 'Gender'|trans }) }}
|
||||
|
||||
{% if form.center is defined %}
|
||||
{{ form_row(form.center) }}
|
||||
{% endif %}
|
||||
|
||||
<ul class="record_actions sticky-form-buttons">
|
||||
<li>
|
||||
{{ form_widget(form.editPerson, { 'attr': { 'class': 'btn btn-create' }}) }}
|
||||
</li>
|
||||
<li>
|
||||
{{ form_widget(form.createPeriod, { 'attr': { 'class': 'btn btn-create' }}) }}
|
||||
<li class="dropdown">
|
||||
<a class="btn btn-create dropdown-toggle"
|
||||
href="#" role="button" id="newPersonMore" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
{{ 'Add the person'|trans }}
|
||||
</a>
|
||||
<ul class="dropdown-menu" aria-labelledby="newPersonMore">
|
||||
<li>
|
||||
{{ form_widget(form.editPerson, { 'attr': { 'class': 'dropdown-item' }}) }}
|
||||
</li>
|
||||
<li>
|
||||
{{ form_widget(form.createPeriod, { 'attr': { 'class': 'dropdown-item' }}) }}
|
||||
</li>
|
||||
<li>
|
||||
{{ form_widget(form.createHousehold, { 'attr': { 'class': 'dropdown-item' }}) }}
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
Reference in New Issue
Block a user