mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 15:13:50 +00:00
Merge remote-tracking branch 'origin/features/edit-accompanying-period-social-work' into _vue_echanges
This commit is contained in:
@@ -24,3 +24,4 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<span id="banner-accompanying-course"></span>
|
||||
|
@@ -67,9 +67,9 @@
|
||||
<h3>{{ p.person.firstname ~ ' ' ~ p.person.lastname }}</h3>
|
||||
<p>
|
||||
{% set born = (p.person.gender == 'woman') ? 'née': 'né' %}
|
||||
{% set gender = (p.person.gender == 'woman') ? 'fa-venus' :
|
||||
{% set gender = (p.person.gender == 'woman') ? 'fa-venus' :
|
||||
(p.person.gender == 'man') ? 'fa-mars' : 'fa-neuter' %}
|
||||
{% set genderTitle = (p.person.gender == 'woman') ? 'femme' :
|
||||
{% set genderTitle = (p.person.gender == 'woman') ? 'femme' :
|
||||
(p.person.gender == 'man') ? 'homme' : 'neutre' %}
|
||||
<i class="fa fa-fw {{ gender }}" title="{{ genderTitle }}"></i>{{ born ~ ' le ' ~ p.person.birthdate|format_date('short') }}
|
||||
</p>
|
||||
@@ -103,9 +103,9 @@
|
||||
</li>
|
||||
{% if p.person.isSharingHousehold %}
|
||||
<li>
|
||||
<a
|
||||
<a
|
||||
href="{{ chill_path_add_return_path(
|
||||
'chill_person_household_summary',
|
||||
'chill_person_household_summary',
|
||||
{ 'household_id': p.person.getCurrentHousehold.id }
|
||||
) }}"
|
||||
class="sc-button">
|
||||
@@ -128,7 +128,7 @@
|
||||
{% for r in accompanyingCourse.resources %}
|
||||
<div class="item-bloc">
|
||||
{% if r.person %}
|
||||
|
||||
|
||||
<div class="item-row">
|
||||
<div class="item-col">
|
||||
<h3>
|
||||
@@ -137,9 +137,9 @@
|
||||
</h3>
|
||||
<p>
|
||||
{% set born = (r.person.gender == 'woman') ? 'née': 'né' %}
|
||||
{% set gender = (r.person.gender == 'woman') ? 'fa-venus' :
|
||||
{% set gender = (r.person.gender == 'woman') ? 'fa-venus' :
|
||||
(r.person.gender == 'man') ? 'fa-mars' : 'fa-neuter' %}
|
||||
{% set genderTitle = (r.person.gender == 'woman') ? 'femme' :
|
||||
{% set genderTitle = (r.person.gender == 'woman') ? 'femme' :
|
||||
(r.person.gender == 'homme') ? 'fa-mars' : 'neutre' %}
|
||||
<i class="fa fa-fw {{ gender }}" title="{{ genderTitle }}"></i>{{ born ~ ' le ' ~ r.person.birthdate|format_date('short') }}
|
||||
</p>
|
||||
@@ -174,10 +174,10 @@
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{% endif %}
|
||||
{% if r.thirdParty %}
|
||||
|
||||
|
||||
<div class="item-row">
|
||||
<div class="item-col">
|
||||
<h3>
|
||||
@@ -214,7 +214,7 @@
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
@@ -222,9 +222,11 @@
|
||||
|
||||
<h2>{{ 'Social actions'|trans }}</h2>
|
||||
|
||||
<h2>{{ 'Last events on accompanying course'|trans }}</h2>
|
||||
|
||||
{% set person = null %}
|
||||
{% block contentActivity %}
|
||||
{% include 'ChillActivityBundle:Activity:list.html.twig' with {'context': 'accompanyingCourse', 'context': 'person'} %}
|
||||
{% endblock %}
|
||||
|
||||
{# ==> insert accompanyingCourse vue component #}
|
||||
<div id="accompanying-course"></div>
|
||||
<div id="accompanying-course"></div>
|
||||
{% endblock %}
|
||||
|
@@ -0,0 +1,24 @@
|
||||
{% extends '@ChillPerson/AccompanyingCourse/layout.html.twig' %}
|
||||
|
||||
{% block title 'accompanying_course_work.Create accompanying course work'|trans %}
|
||||
|
||||
|
||||
{% block content %}
|
||||
<h1>{{ block('title') }}</h1>
|
||||
|
||||
<div id="accompanying_course_work_create"></div>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block js %}
|
||||
<script type="text/javascript">
|
||||
window.accompanyingCourse = {{ json|json_encode|raw }};
|
||||
</script>
|
||||
|
||||
{{ encore_entry_script_tags('accompanying_course_work_create') }}
|
||||
{% endblock %}
|
||||
|
||||
{% block css %}
|
||||
{{ parent() }}
|
||||
{{ encore_entry_link_tags('accompanying_course_work_create') }}
|
||||
{% endblock %}
|
@@ -0,0 +1,25 @@
|
||||
{% extends '@ChillPerson/AccompanyingCourse/layout.html.twig' %}
|
||||
|
||||
{% block title 'accompanying_course_work.Edit accompanying course work'|trans %}
|
||||
|
||||
|
||||
{% block content %}
|
||||
<h1>{{ block('title') }}</h1>
|
||||
|
||||
<div id="accompanying_course_work_edit"></div>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block js %}
|
||||
{{ parent() }}
|
||||
<script type="text/javascript">
|
||||
window.accompanyingCourseWork = {{ json|json_encode|raw }};
|
||||
</script>
|
||||
|
||||
{{ encore_entry_script_tags('accompanying_course_work_edit') }}
|
||||
{% endblock %}
|
||||
|
||||
{% block css %}
|
||||
{{ parent() }}
|
||||
{{ encore_entry_link_tags('accompanying_course_work_edit') }}
|
||||
{% endblock %}
|
@@ -0,0 +1,124 @@
|
||||
{% extends '@ChillPerson/AccompanyingCourse/layout.html.twig' %}
|
||||
|
||||
{% block title 'accompanying_course_work.List accompanying course work'|trans %}
|
||||
|
||||
|
||||
{% block content %}
|
||||
<h1>{{ block('title') }}</h1>
|
||||
|
||||
<div id="accompanying_course_work_list">
|
||||
{% 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': true }) }}
|
||||
</h2>
|
||||
</div>
|
||||
|
||||
<div class="timeline">
|
||||
<ul class="timeline">
|
||||
<li class="completed">
|
||||
<div class="date">
|
||||
<span>{{ w.createdAt|format_date('long') }}</span>
|
||||
</div>
|
||||
<div class="label">
|
||||
<span>{{ 'accompanying_course_work.create_date'|trans }}</span>
|
||||
</div>
|
||||
</li>
|
||||
<li class="completed">
|
||||
<div class="date">
|
||||
<span>{{ w.startDate|format_date('long') }}</span>
|
||||
</div>
|
||||
<div class="label">
|
||||
<span>{{ 'accompanying_course_work.start_date'|trans }}</span>
|
||||
</div>
|
||||
</li>
|
||||
<li class="{%if date(w.endDate) < date('now') %}completed{% endif %}">
|
||||
<div class="date">
|
||||
<span>{{ w.endDate|format_date('long') }}</span>
|
||||
</div>
|
||||
<div class="label">
|
||||
<span>{{ 'accompanying_course_work.end_date'|trans }}</span>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
{% if w.results|length > 0 %}
|
||||
<div class="objective_results objective_results__without-objectives">
|
||||
<div class="obj without_objective">
|
||||
<p class="title_label">{{ 'accompanying_course_work.goal'|trans }}</p>
|
||||
<p class="chill-no-data-statement">{{ 'accompanying_course_work.results without objective'|trans }}</p>
|
||||
</div>
|
||||
<div class="res results">
|
||||
<p class="title_label">{{ 'accompanying_course_work.results'|trans }}</p>
|
||||
<ul class="result_list">
|
||||
{% for r in w.results %}
|
||||
<li class="badge badge-primary">{{ r.title|localize_translatable_string }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if w.goals|length > 0 %}
|
||||
{% for g in w.goals %}
|
||||
<div class="objective_results objective_results--with-objectives">
|
||||
<div class="objective obj">
|
||||
<p class="title_label">{{ 'accompanying_course_work.goal'|trans }}</p>
|
||||
<h3 class="goal_title">{{ g.goal.title|localize_translatable_string }}</h3>
|
||||
</div>
|
||||
<div class="results res">
|
||||
{% if g.results|length == 0 %}
|
||||
<p class="title_label">{{ 'accompanying_course_work.results'|trans }}</p>
|
||||
<p class="chill-no-data-statement">{{ 'accompanying_course_work.no_results'|trans }}</p>
|
||||
{% else %}
|
||||
<p class="title_label">{{ 'accompanying_course_work.results'|trans }}</p>
|
||||
<ul class="result_list">
|
||||
{% for r in g.results %}
|
||||
<li class="badge badge-primary">{{ r.title|localize_translatable_string }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
<div class="updatedBy">
|
||||
{{ 'Last updated by'|trans}}: {{ w.updatedBy|chill_entity_render_box }}, {{ w.updatedAt|format_datetime('long', 'short') }}
|
||||
</div>
|
||||
|
||||
|
||||
<div class="actions">
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a
|
||||
class="sc-button bt-edit"
|
||||
href="{{ chill_path_add_return_path('chill_person_accompanying_period_work_edit', { 'id': w.id }) }}">{{ 'Update'|trans }}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
{% else %}
|
||||
<p class="chill-no-data-statement">{{ 'accompanying_course_work.No work'|trans }}</p>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
<ul class="record_actions sticky-form-buttons">
|
||||
<li>
|
||||
<a href="{{ chill_path_add_return_path('chill_person_accompanying_period_work_new', { 'id': accompanyingCourse.id }) }}"
|
||||
class="sc-button bt-new">
|
||||
{{ 'accompanying_course_work.create'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block css %}
|
||||
{{ parent() }}
|
||||
{{ encore_entry_link_tags('accompanying_course_work_list') }}
|
||||
{% endblock %}
|
@@ -1,6 +1,6 @@
|
||||
{% set reversed_parents = parents|reverse %}
|
||||
<span class="chill-entity chill-entity__social-action">
|
||||
<span class="badge badge-primary">
|
||||
<span class="{% if not options['no-badge'] %}badge badge-primary{% endif %}">
|
||||
{%- for p in reversed_parents %}
|
||||
<span class="chill-entity__social-action__parent--{{ loop.revindex0 }}">
|
||||
{{ p.title|localize_translatable_string }}{{ options['default.separator'] }}
|
||||
|
@@ -12,7 +12,7 @@
|
||||
<ul class="record_actions sticky-form-buttons">
|
||||
<li class="cancel">
|
||||
<a
|
||||
href="{{ chill_return_path_or('chill_person_household_members', { 'household_id': household.id}) }}"
|
||||
href="{{ chill_return_path_or('chill_person_household_summary', { 'household_id': household.id}) }}"
|
||||
class="sc-button bt-cancel"
|
||||
>
|
||||
{{ 'Cancel'|trans }}
|
||||
|
@@ -12,28 +12,38 @@
|
||||
|
||||
<div class="grid-3" id="banner-flags"></div>
|
||||
|
||||
<div class="grid-3" id="banner-status"></div>
|
||||
<div class="grid-3" id="banner-status">
|
||||
{% set address = household.currentAddress %}
|
||||
{% 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, 'with_valid_from': false}) }}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid-12 parent" id="header-household-details" >
|
||||
<div class="grid-10 push-1 grid-mobile-12 grid-tablet-12 push-mobile-0 push-tablet-0 parent">
|
||||
<div id="banner-misc">
|
||||
{%- set persons = household.getCurrentPersons() -%}
|
||||
{%- if persons|length > 0 -%}
|
||||
<span class="current-members-explain">
|
||||
{{- 'household.Current household members'|trans }}:
|
||||
</span>
|
||||
{%- for p in persons|slice(0, 5) -%}
|
||||
{{- p|chill_entity_render_box({'addLink': false}) -}}
|
||||
{%- if false == loop.last -%}, {% endif -%}
|
||||
{%- endfor -%}
|
||||
{% if persons|length > 5 %}
|
||||
<span class="current-members-more">
|
||||
{{ 'household.and x other persons'|trans({'x': persons|length-5}) }}
|
||||
</span>
|
||||
{% endif %}
|
||||
{%- endif -%}
|
||||
{%- set members = household.getCurrentMembersOrdered() -%}
|
||||
{%- if members|length > 0 -%}
|
||||
<span class="current-members-explain">
|
||||
{{- 'household.Current household members'|trans }}:
|
||||
</span>
|
||||
{%- for m in members|slice(0, 5) -%}
|
||||
{{- m.person|chill_entity_render_box({'addLink': false}) -}}
|
||||
{%- if m.holder %} <span class="badge badge-primary">{{ 'household.holder'|trans }}</span>{% endif -%}
|
||||
{%- if false == loop.last -%}, {% endif -%}
|
||||
{%- 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>
|
||||
</div>
|
||||
|
@@ -5,49 +5,233 @@
|
||||
{% block content %}
|
||||
<h1>{{ block('title') }}</h1>
|
||||
|
||||
<h2>{{ 'household.Current household members'|trans }}</h2>
|
||||
<h2>{{ 'household.Current address'|trans }}</h2>
|
||||
|
||||
{% set address = household.currentAddress %}
|
||||
|
||||
{% 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="sc-button bt-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="sc-button bt-edit"
|
||||
>
|
||||
{{ 'household.Comment and expecting birth'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% for p in positions %}
|
||||
{%- set members = household.currentMembersByPosition(p) %}
|
||||
{% if members|length > 0 %}
|
||||
<h3>{{ p.label|localize_translatable_string }}</h3>
|
||||
<h3>{{ p.label|localize_translatable_string }}</h3>
|
||||
|
||||
{% if false == p.shareHousehold %}
|
||||
<p>{{ 'household.Those members does not share address'|trans }}</p>
|
||||
{% endif %}
|
||||
{% if false == p.shareHousehold %}
|
||||
<p>{{ 'household.Those members does not share address'|trans }}</p>
|
||||
{% endif %}
|
||||
|
||||
<div class="flex-table list-household-members--summary">
|
||||
{% for m in members %}
|
||||
<div class="item-bloc">
|
||||
<div class="item-row person">
|
||||
<div class="item-col box-person">
|
||||
<div>
|
||||
{{ m.person|chill_entity_render_box({'addLink': true}) }}
|
||||
{% if m.holder %}
|
||||
<span class="badge badge-primary">{{ 'household.holder'|trans }}</span>
|
||||
{%- 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 person">
|
||||
<div class="item-col box-person">
|
||||
<div>
|
||||
{{ m.person|chill_entity_render_box({'addLink': true}) }}
|
||||
{% if m.holder %}
|
||||
<span class="badge badge-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 box-where">
|
||||
<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="sc-button bt-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="sc-button"
|
||||
/>
|
||||
<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="sc-button"
|
||||
/>
|
||||
<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>
|
||||
<div>
|
||||
{{ 'Born the date'|trans({ 'gender': m.person.gender, 'birthdate': m.person.birthdate|format_date('long') }) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="item-col box-where">
|
||||
<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>
|
||||
{% 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="sc-button bt-green" type="button" data-toggle="collapse" data-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 person">
|
||||
<div class="item-col box-person">
|
||||
<div>
|
||||
{{ m.person|chill_entity_render_box({'addLink': true}) }}
|
||||
{% if m.holder %}
|
||||
<span class="badge badge-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 box-where">
|
||||
<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="sc-button bt-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>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a
|
||||
href="{{ chill_path_add_return_path('chill_person_household_members_editor', {'household': household.id }) }}"
|
||||
class="sc-button bt-create">
|
||||
{{ 'household.Add a member'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block js %}
|
||||
{{ encore_entry_script_tags('household_edit_metadata') }}
|
||||
{% endblock %}
|
||||
|
||||
|
@@ -43,6 +43,7 @@
|
||||
{{ form_widget(form.altNames, { 'label': 'Alternative names'}) }}
|
||||
{% endif %}
|
||||
{{ form_row(form.gender, {'label' : 'Gender'}) }}
|
||||
{{ form_row(form.genderComment, { 'label' : 'Comment on the gender'} ) }}
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
@@ -54,9 +55,12 @@
|
||||
{%- if form.countryOfBirth is defined -%}
|
||||
{{ form_row(form.countryOfBirth, { 'label' : 'Country of birth' } ) }}
|
||||
{%- endif -%}
|
||||
{%- if form.deathdate is defined -%}
|
||||
{{ form_row(form.deathdate, { 'label' : 'Date of death' } ) }}
|
||||
{%- endif -%}
|
||||
</fieldset>
|
||||
|
||||
{%- if form.nationality is defined or form.spokenLanguages is defined or form.maritalStatus is defined -%}
|
||||
{%- if form.nationality is defined or form.spokenLanguages is defined -%}
|
||||
<fieldset>
|
||||
<legend><h2>{{ 'Administrative information'|trans }}</h2></legend>
|
||||
{%- if form.nationality is defined -%}
|
||||
@@ -65,8 +69,21 @@
|
||||
{%- if form.spokenLanguages is defined -%}
|
||||
{{ form_row(form.spokenLanguages, {'label' : 'Spoken languages'}) }}
|
||||
{%- endif -%}
|
||||
</fieldset>
|
||||
{%- endif -%}
|
||||
|
||||
{%- if form.numberOfChildren is defined or form.maritalStatus is defined -%}
|
||||
<fieldset>
|
||||
<legend><h2>{{ 'Marital status'|trans }}</h2></legend>
|
||||
{{ form_row(form.numberOfChildren, {'label' : 'Number of children'}) }}
|
||||
{%- if form.maritalStatus is defined -%}
|
||||
{{ form_row(form.maritalStatus, { 'label' : 'Marital status'} ) }}
|
||||
<div id="maritalStatus">
|
||||
{{ form_row(form.maritalStatus, { 'label' : 'Marital status'} ) }}
|
||||
</div>
|
||||
<div id="maritalStatusDate">
|
||||
{{ form_row(form.maritalStatusDate, { 'label' : 'Date of last marital status change'} ) }}
|
||||
{{ form_row(form.maritalStatusComment, { 'label' : 'Comment on the marital status'} ) }}
|
||||
</div>
|
||||
{%- endif -%}
|
||||
</fieldset>
|
||||
{%- endif -%}
|
||||
@@ -75,13 +92,24 @@
|
||||
<fieldset>
|
||||
<legend><h2>{{ 'Contact information'|trans }}</h2></legend>
|
||||
{%- if form.email is defined -%}
|
||||
{{ form_row(form.email, {'label': 'Email'}) }}
|
||||
<div id="personEmail">
|
||||
{{ form_row(form.email, {'label': 'Email'}) }}
|
||||
</div>
|
||||
<div id="personAcceptEmail">
|
||||
{{ form_row(form.acceptEmail, {'label' : 'Accept emails ?'}) }}
|
||||
</div>
|
||||
{%- endif -%}
|
||||
|
||||
{%- if form.phonenumber is defined -%}
|
||||
{{ form_row(form.phonenumber, {'label': 'Phonenumber'}) }}
|
||||
{%- endif -%}
|
||||
{%- if form.mobilenumber is defined -%}
|
||||
{{ form_row(form.mobilenumber, {'label': 'Mobilenumber'}) }}
|
||||
<div id="personPhoneNumber">
|
||||
{{ form_row(form.mobilenumber, {'label': 'Mobilenumber'}) }}
|
||||
</div>
|
||||
<div id="personAcceptSMS">
|
||||
{{ form_row(form.acceptSMS, {'label' : 'Accept short text message ?'}) }}
|
||||
</div>
|
||||
{%- endif -%}
|
||||
{%- if form.otherPhoneNumbers is defined -%}
|
||||
{{ form_widget(form.otherPhoneNumbers) }}
|
||||
@@ -114,3 +142,8 @@
|
||||
|
||||
|
||||
{% endblock personcontent %}
|
||||
|
||||
|
||||
{% block js %}
|
||||
<script type="text/javascript" src="{{ asset('build/person.js') }}"></script>
|
||||
{% endblock js %}
|
||||
|
@@ -73,12 +73,14 @@ This view should receive those arguments:
|
||||
|
||||
<dt>{{ 'Gender'|trans }} :</dt>
|
||||
<dd>{{ ( person.gender|default('Not given'))|trans }}</dd>
|
||||
|
||||
{% if not person.genderComment.isEmpty %}
|
||||
<dt>{{ 'Gender comment'|trans }} :</dt>
|
||||
<dd>{{ person.genderComment|chill_entity_render_box }}</dd>
|
||||
{% endif %}
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
{% if is_granted('CHILL_PERSON_UPDATE', person) %}
|
||||
{{ include(edit_tmp_name, edit_tmp_args) }}
|
||||
{% endif %}
|
||||
</figure>
|
||||
</div>
|
||||
|
||||
@@ -114,11 +116,14 @@ This view should receive those arguments:
|
||||
{% endif %}
|
||||
{% endapply %}</dd>
|
||||
{%- endif -%}
|
||||
|
||||
{% if person.deathdate is not null %}
|
||||
<dt>{{ 'Date of death'|trans }} :</dt>
|
||||
<dd>{{ person.deathdate|format_date('long') }}</dd>
|
||||
{% endif %}
|
||||
|
||||
</dl>
|
||||
|
||||
{% if is_granted('CHILL_PERSON_UPDATE', person) %}
|
||||
{{ include(edit_tmp_name, edit_tmp_args) }}
|
||||
{% endif %}
|
||||
</figure>
|
||||
</div>
|
||||
</div>
|
||||
@@ -155,6 +160,21 @@ This view should receive those arguments:
|
||||
</dd>
|
||||
</dl>
|
||||
{%- endif -%}
|
||||
|
||||
|
||||
{%-if chill_person.fields.number_of_children == 'visible' -%}
|
||||
<dl>
|
||||
<dt>{{'Number of children'|trans}} :</dt>
|
||||
<dd>
|
||||
{% if person.numberOfChildren is not null %}
|
||||
{{ person.numberOfChildren }}
|
||||
{% else %}
|
||||
<span class="chill-no-data-statement">{{ 'No data given'|trans }}</span>
|
||||
{% endif %}
|
||||
</dd>
|
||||
</dl>
|
||||
{%- endif -%}
|
||||
|
||||
{%- if chill_person.fields.marital_status == 'visible' -%}
|
||||
<dl>
|
||||
<dt>{{'Marital status'|trans}} :</dt>
|
||||
@@ -166,11 +186,24 @@ This view should receive those arguments:
|
||||
{% endif %}
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt>{{'Date of last marital status change'|trans}} :</dt>
|
||||
{% if person.maritalStatusDate is not null %}
|
||||
<dd>
|
||||
{{ person.maritalStatusDate|format_date('long') }}
|
||||
</dd>
|
||||
{% endif %}
|
||||
</dl>
|
||||
<dl>
|
||||
{% if not person.maritalStatusComment.isEmpty %}
|
||||
<dt>{{'Comment on the marital status'|trans}} :</dt>
|
||||
<dd>
|
||||
{{ person.maritalStatusComment|chill_entity_render_box }}
|
||||
</dd>
|
||||
{% endif %}
|
||||
</dl>
|
||||
{%- endif -%}
|
||||
|
||||
{% if is_granted('CHILL_PERSON_UPDATE', person) %}
|
||||
{{ include(edit_tmp_name, edit_tmp_args) }}
|
||||
{% endif %}
|
||||
</figure>
|
||||
</div>
|
||||
{%- endif -%}
|
||||
@@ -213,6 +246,13 @@ This view should receive those arguments:
|
||||
<dl>
|
||||
<dt>{{ 'Email'|trans }} :</dt>
|
||||
<dd>{% if person.email is not empty %}<a href="mailto:{{ person.email|escape('html_attr') }}">{{ person.email }}</a>{% else %}<span class="chill-no-data-statement">{{ 'No data given'|trans }}</span>{% endif %}</dd>
|
||||
{%- if person.email is not empty and person.acceptEmail -%}
|
||||
<dd>
|
||||
<span class="badge badge-secondary">
|
||||
{{- 'Accept emails'|trans -}}
|
||||
</span>
|
||||
</dd>
|
||||
{%- endif -%}
|
||||
</dl>
|
||||
{%- endif -%}
|
||||
{%- if chill_person.fields.phonenumber == 'visible' -%}
|
||||
@@ -225,6 +265,13 @@ This view should receive those arguments:
|
||||
<dl>
|
||||
<dt>{{ 'Mobilenumber'|trans }} :</dt>
|
||||
<dd>{% if person.mobilenumber is not empty %}<a href="tel:{{ person.mobilenumber }}"><pre>{{ person.mobilenumber|chill_format_phonenumber }}</pre></a>{% else %}<span class="chill-no-data-statement">{{ 'No data given'|trans }}{% endif %}</dd>
|
||||
{%- if person.mobilenumber is not empty and person.acceptSMS -%}
|
||||
<dd>
|
||||
<span class="badge badge-secondary">
|
||||
{{- 'Accept short text message'|trans -}}
|
||||
</span>
|
||||
</dd>
|
||||
{%- endif -%}
|
||||
</dl>
|
||||
{% endif %}
|
||||
{% for pp in person.otherPhoneNumbers %}
|
||||
@@ -253,9 +300,6 @@ This view should receive those arguments:
|
||||
</dl>
|
||||
{%- endif -%}
|
||||
|
||||
{% if is_granted('CHILL_PERSON_UPDATE', person) %}
|
||||
{{ include(edit_tmp_name, edit_tmp_args) }}
|
||||
{% endif %}
|
||||
</figure>
|
||||
</div>
|
||||
{%- endif -%}
|
||||
@@ -272,14 +316,21 @@ This view should receive those arguments:
|
||||
|
||||
<div class="grid-10 push-1 grid-mobile-12 grid-tablet-12 push-mobile-0 push-tablet-0 parent">
|
||||
<figure class="person-details">
|
||||
|
||||
{% if is_granted('CHILL_PERSON_UPDATE', person) %}
|
||||
{{ include(edit_tmp_name, edit_tmp_args) }}
|
||||
{% endif %}
|
||||
</figure>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if is_granted('CHILL_PERSON_UPDATE', person) %}
|
||||
<ul class="grid-12 sticky-form-buttons record_actions ">
|
||||
<li>
|
||||
<a class="sc-button bt-update" href="{{ path('chill_person_general_edit', { 'person_id': person.id }) }}">
|
||||
{{ 'Edit'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
||||
</div> <!-- end of div.person-view -->
|
||||
|
||||
{% endblock %}
|
||||
|
Reference in New Issue
Block a user