mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 15:13:50 +00:00
fix conflicts when merging master
This commit is contained in:
@@ -0,0 +1,92 @@
|
||||
{% extends '@ChillPerson/AccompanyingCourse/layout.html.twig' %}
|
||||
|
||||
{% block title %}
|
||||
{{ 'Accompanying Course Comment list'|trans }}
|
||||
{% endblock %}
|
||||
|
||||
{% macro show_comment(comment, options) %}
|
||||
<div class="item-bloc">
|
||||
<div class="item-row">
|
||||
<div>
|
||||
{% if options.pinned is defined %}
|
||||
<i class="fa fa-flag fa-fw fa-lg" title="{{ 'pinned'|trans }}"></i>
|
||||
{% endif %}
|
||||
<a id="comment{{ comment.id }}" href="{{ '#comment' ~ comment.id }}" class="fa fa-pencil-square-o fa-fw"></a>
|
||||
{{ 'by'|trans }}<b>{{ comment.creator }}</b>{{ ', ' ~ 'on'|trans ~ ' ' ~ comment.createdAt|format_date('long') }}<br>
|
||||
<i>{{ 'Last updated on'|trans ~ ' ' ~ comment.updatedAt|format_datetime('long', 'short') }}</i>
|
||||
</div>
|
||||
<ul class="record_actions">
|
||||
{% if options.pinned is not defined %}
|
||||
<li>
|
||||
<button class="btn btn-sm btn-misc" type="button">
|
||||
<i class="fa fa-flag fa-fw"></i>
|
||||
Épingler
|
||||
</button>
|
||||
</li>
|
||||
{% endif %}
|
||||
<li>
|
||||
<a class="btn btn-sm btn-edit" title="{{ 'Edit'|trans }}" href="{{ path('chill_person_accompanying_period_comment_list', {
|
||||
'accompanying_period_id': comment.accompanyingPeriod.id,
|
||||
'edit': comment.id
|
||||
}) ~ '#comment' ~ comment.id }}"></a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="btn btn-sm btn-delete" title="{{ 'Delete'|trans }}" href=""></a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="item-row separator">
|
||||
<blockquote class="chill-user-quote col">{{ comment.content|chill_markdown_to_html }}</blockquote>
|
||||
</div>
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro form_comment(type, form) %}
|
||||
{% if type == 'edit' %}
|
||||
<div class="item-bloc">
|
||||
<div class="item-row row">
|
||||
{% endif %}
|
||||
{{ form_start(form) }}
|
||||
{{ form_errors(form) }}
|
||||
{{ form_widget(form.content) }}
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
{% if type == 'new' %}
|
||||
<button class="btn btn-create" type="submit">{{ 'Post a new comment'|trans }}</button>
|
||||
{% elseif type == 'edit' %}
|
||||
<button class="btn btn-save" type="submit">{{ 'Save'|trans }}</button>
|
||||
{% endif %}
|
||||
</li>
|
||||
</ul>
|
||||
{{ form_end(form) }}
|
||||
{% if type == 'edit' %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
|
||||
{% block content %}
|
||||
<div class="accompanyingcourse-comment-list">
|
||||
<h1>{{ block('title') }}</h1>
|
||||
<div class="flex-table">
|
||||
{% if accompanyingCourse.pinnedComment %}
|
||||
{% if commentEditId == accompanyingCourse.pinnedComment.id %}
|
||||
{{ _self.form_comment('edit', edit_form) }}
|
||||
{% else %}
|
||||
{{ _self.show_comment(accompanyingCourse.pinnedComment, {'pinned': 'true'}) }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% for c in accompanyingCourse.comments %}
|
||||
{% if commentEditId == c.id %}
|
||||
{{ _self.form_comment('edit', edit_form) }}
|
||||
{% else %}
|
||||
{{ _self.show_comment(c) }}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div class="new-comment my-5">
|
||||
<h2 class="chill-blue">{{ 'Write a new comment'|trans }}</h2>
|
||||
{{ _self.form_comment('new', form) }}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
@@ -78,6 +78,25 @@
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if accompanyingCourse.pinnedComment is not empty %}
|
||||
<div class="col col-sm-6 col-lg-4 comment mb-4">
|
||||
<h4 class="item-key">{{ 'Pinned comment'|trans }}</h4>
|
||||
<blockquote class="chill-user-quote">
|
||||
{{ accompanyingCourse.pinnedComment.content }}
|
||||
<div class="metadata">
|
||||
{{ 'Last updated by'| trans }}
|
||||
<span class="user">
|
||||
{{ accompanyingCourse.pinnedComment.updatedBy|chill_entity_render_box }}
|
||||
</span>
|
||||
{{ 'on'|trans ~ ' ' }}
|
||||
<span class="date">
|
||||
{{ accompanyingCourse.pinnedComment.updatedAt|format_datetime("medium", "short") }}
|
||||
</span>
|
||||
</div>
|
||||
</blockquote>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if accompanyingCourse.scopes is not empty %}
|
||||
<div class="col col-sm-6 col-lg-4 scopes mb-4">
|
||||
<h4 class="item-key">{{ 'Scopes'|trans }}</h4>
|
||||
|
@@ -0,0 +1,102 @@
|
||||
|
||||
{% if w.results|length > 0 %}
|
||||
<table class="obj-res-eval my-3">
|
||||
<thead>
|
||||
<th class="obj"><h4 class="title_label">{{ 'accompanying_course_work.goal'|trans }}</h4></th>
|
||||
<th class="res"><h4 class="title_label">{{ 'accompanying_course_work.results'|trans }}</h4></th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="obj">
|
||||
<p class="chill-no-data-statement">{{ 'accompanying_course_work.results without objective'|trans }}</p>
|
||||
</td>
|
||||
<td class="res">
|
||||
<ul class="result_list">
|
||||
{% for r in w.results %}
|
||||
<li>{{ r.title|localize_translatable_string }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
{% endif %}
|
||||
|
||||
{% if w.goals|length > 0 %}
|
||||
<table class="obj-res-eval my-3">
|
||||
<thead>
|
||||
<th class="obj"><h4 class="title_label">{{ 'accompanying_course_work.goal'|trans }}</h4></th>
|
||||
<th class="res"><h4 class="title_label">{{ 'accompanying_course_work.results'|trans }}</h4></th>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for g in w.goals %}
|
||||
<tr>
|
||||
<td class="obj">
|
||||
<ul class="goal_title">
|
||||
<li>{{ g.goal.title|localize_translatable_string }}</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td class="res">
|
||||
{% if g.results|length == 0 %}
|
||||
<p class="chill-no-data-statement">{{ 'accompanying_course_work.no_results'|trans }}</p>
|
||||
{% else %}
|
||||
<ul class="result_list">
|
||||
{% for r in g.results %}
|
||||
<li>{{ r.title|localize_translatable_string }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% endif %}
|
||||
|
||||
{% if w.accompanyingPeriodWorkEvaluations|length > 0 %}
|
||||
<table class="obj-res-eval my-3">
|
||||
<thead>
|
||||
<th class="eval">
|
||||
<h4 class="title_label">{{ 'accompanying_course_work.evaluations'|trans }}</h4>
|
||||
</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for e in w.accompanyingPeriodWorkEvaluations %}
|
||||
<tr>
|
||||
<td class="eval">
|
||||
<ul class="eval_title">
|
||||
<li>
|
||||
{{ e.evaluation.title|localize_translatable_string }}
|
||||
<ul class="columns">
|
||||
<li>
|
||||
<span class="item-key">{{ 'accompanying_course_work.start_date'|trans ~ ' : ' }}</span>
|
||||
<b>{{ e.startDate|format_date('short') }}</b>
|
||||
</li>
|
||||
{% if e.endDate %}
|
||||
<li>
|
||||
<span class="item-key">{{ 'accompanying_course_work.end_date'|trans ~ ' : ' }}</span>
|
||||
<b>{{ e.endDate|format_date('short') }}</b>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if e.maxDate %}
|
||||
<li>
|
||||
<span class="item-key">{{ 'accompanying_course_work.max_date'|trans ~ ' : ' }}</span>
|
||||
<b>{{ e.maxDate|format_date('short') }}</b>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if e.warningInterval and e.warningInterval.d > 0 %}
|
||||
<li>
|
||||
{% set days = (e.warningInterval.d + e.warningInterval.m * 30) %}
|
||||
<span class="item-key">{{ 'accompanying_course_work.warning_interval'|trans ~ ' : ' }}</span>
|
||||
{{ 'accompanying_course_work.%days% days before max_date'|trans({'%days%': days }) }}
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% endif %}
|
@@ -65,11 +65,12 @@
|
||||
</div>
|
||||
<div class="wl-col list">
|
||||
{% for p in w.persons %}
|
||||
<span class="wl-item badge-person">
|
||||
{{ p|chill_entity_render_box({
|
||||
'render': 'raw',
|
||||
'addAltNames': false
|
||||
}) }}
|
||||
<span class="wl-item">
|
||||
{% include '@ChillMain/OnTheFly/_insert_vue_onthefly.html.twig' with {
|
||||
action: 'show', displayBadge: true,
|
||||
targetEntity: { name: 'person', id: p.id },
|
||||
buttonText: p|chill_entity_render_string
|
||||
} %}
|
||||
</span>
|
||||
{% endfor %}
|
||||
</div>
|
||||
@@ -82,11 +83,12 @@
|
||||
<h3>{{ 'Thirdparty handling'|trans }}</h3>
|
||||
</div>
|
||||
<div class="wl-col list">
|
||||
<span class="wl-item badge-thirdparty">
|
||||
{{ w.handlingThierParty|chill_entity_render_box({
|
||||
'render': 'raw',
|
||||
'addAltNames': false
|
||||
}) }}
|
||||
<span class="wl-item">
|
||||
{% include '@ChillMain/OnTheFly/_insert_vue_onthefly.html.twig' with {
|
||||
action: 'show', displayBadge: true,
|
||||
targetEntity: { name: 'thirdparty', id: w.handlingThierParty.id },
|
||||
buttonText: w.handlingThierParty|chill_entity_render_string
|
||||
} %}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -105,94 +107,11 @@
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if w.accompanyingPeriodWorkEvaluations|length > 0 %}
|
||||
<div class="wl-row">
|
||||
<div class="wl-col title">
|
||||
<h3>{{ 'accompanying_course_work.evaluations'|trans }}</h3>
|
||||
</div>
|
||||
<div class="wl-col list">
|
||||
<ul class="small_in_title evaluations mt-1">
|
||||
{% for e in w.accompanyingPeriodWorkEvaluations %}
|
||||
<li>
|
||||
{{ e.evaluation.title|localize_translatable_string }}
|
||||
|
||||
<ul class="columns">
|
||||
<li>
|
||||
<span class="item-key">{{ 'accompanying_course_work.start_date'|trans ~ ' : ' }}</span>
|
||||
<b>{{ e.startDate|format_date('short') }}</b>
|
||||
</li>
|
||||
{% if e.endDate %}
|
||||
<li>
|
||||
<span class="item-key">{{ 'accompanying_course_work.end_date'|trans ~ ' : ' }}</span>
|
||||
<b>{{ e.endDate|format_date('short') }}</b>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if e.maxDate %}
|
||||
<li>
|
||||
<span class="item-key">{{ 'accompanying_course_work.max_date'|trans ~ ' : ' }}</span>
|
||||
<b>{{ e.maxDate|format_date('short') }}</b>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if e.warningInterval and e.warningInterval.d > 0 %}
|
||||
<li>
|
||||
{% set days = (e.warningInterval.d + e.warningInterval.m * 30) %}
|
||||
<span class="item-key">{{ 'accompanying_course_work.warning_interval'|trans ~ ' : ' }}</span>
|
||||
{{ 'accompanying_course_work.%days% days before max_date'|trans({'%days%': days }) }}
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="item-row column">
|
||||
{# SEULEMENT SI DÉTAILLÉ
|
||||
{% if w.results|length > 0 %}
|
||||
<div class="objective_results without-objectives">
|
||||
<div class="objective">
|
||||
<h4 class="title_label">{{ 'accompanying_course_work.goal'|trans }}</h4>
|
||||
<p class="chill-no-data-statement">{{ 'accompanying_course_work.results without objective'|trans }}</p>
|
||||
</div>
|
||||
<div class="results">
|
||||
<h4 class="title_label">{{ 'accompanying_course_work.results'|trans }}</h4>
|
||||
<ul class="result_list">
|
||||
{% for r in w.results %}
|
||||
<li>{{ 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 with-objectives">
|
||||
<div class="objective">
|
||||
<h4 class="title_label">{{ 'accompanying_course_work.goal'|trans }}</h4>
|
||||
<ul class="goal_title"><li>{{ g.goal.title|localize_translatable_string }}</li></ul>
|
||||
</div>
|
||||
<div class="results">
|
||||
<h4 class="title_label">{{ 'accompanying_course_work.results'|trans }}</h4>
|
||||
{% if g.results|length == 0 %}
|
||||
<p class="chill-no-data-statement">{{ 'accompanying_course_work.no_results'|trans }}</p>
|
||||
{% else %}
|
||||
<ul class="result_list">
|
||||
{% for r in g.results %}
|
||||
<li>{{ r.title|localize_translatable_string }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
#}
|
||||
{% include 'ChillPersonBundle:AccompanyingCourseWork:_objectifs_results_evaluations.html.twig' with {} %}
|
||||
</div>
|
||||
|
||||
<div class="item-row separator">
|
||||
|
@@ -42,27 +42,8 @@
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul class="small_in_title evaluations mb-3">
|
||||
{% for e in w.accompanyingPeriodWorkEvaluations %}
|
||||
<li>
|
||||
<span class="item-key">{{ 'accompanying_course_work.social_evaluation'|trans ~ ' : ' }}</span>
|
||||
{{ e.evaluation.title|localize_translatable_string }}
|
||||
<ul class="columns">
|
||||
{% if e.startDate %}
|
||||
<li>
|
||||
<span class="item-key">{{ 'accompanying_course_work.start_date'|trans ~ ' : ' }}</span>
|
||||
<b>{{ e.startDate|format_date('short') }}</b>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if e.endDate %}
|
||||
<li>
|
||||
<span class="item-key">{{ 'accompanying_course_work.end_date'|trans ~ ' : ' }}</span>
|
||||
<b>{{ e.endDate|format_date('short') }}</b>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</li>
|
||||
{% endfor %}
|
||||
<ul class="small_in_title mb-3 ps-0">
|
||||
{% include 'ChillPersonBundle:AccompanyingCourseWork:_objectifs_results_evaluations.html.twig' with {} %}
|
||||
</ul>
|
||||
|
||||
<div class="metadata text-end" style="font-size: 60%">
|
||||
|
@@ -66,10 +66,22 @@
|
||||
<div class="wl-col title"><h3>{{ 'Requestor'|trans({'gender': null }) }}</h3></div>
|
||||
<div class="wl-col list">
|
||||
{% if accompanying_period.requestorPerson is not null %}
|
||||
<span class="wl-item badge-person">{{ accompanying_period.requestorPerson|chill_entity_render_string }}</span>
|
||||
<span class="wl-item">
|
||||
{% include '@ChillMain/OnTheFly/_insert_vue_onthefly.html.twig' with {
|
||||
action: 'show', displayBadge: true,
|
||||
targetEntity: { name: 'person', id: accompanying_period.requestorPerson.id },
|
||||
buttonText: accompanying_period.requestorPerson|chill_entity_render_string
|
||||
} %}
|
||||
</span>
|
||||
{% endif %}
|
||||
{% if accompanying_period.requestorThirdParty is not null %}
|
||||
<span class="wl-item badge-thirdparty">{{ accompanying_period.requestorThirdParty|chill_entity_render_string }}</span>
|
||||
<span class="wl-item">
|
||||
{% include '@ChillMain/OnTheFly/_insert_vue_onthefly.html.twig' with {
|
||||
action: 'show', displayBadge: true,
|
||||
targetEntity: { name: 'thirdparty', id: accompanying_period.requestorThirdParty.id },
|
||||
buttonText: accompanying_period.requestorThirdParty|chill_entity_render_string
|
||||
} %}
|
||||
</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
@@ -80,13 +92,12 @@
|
||||
<div class="wl-col title"><h3>{{ 'Participants'|trans }}</h3></div>
|
||||
<div class="wl-col list">
|
||||
{% for p in accompanying_period.getCurrentParticipations %}
|
||||
<span class="wl-item badge-person">
|
||||
<a href="{{ path('chill_person_accompanying_period_list', { person_id: p.person.id }) }}">
|
||||
{{ p.person|chill_entity_render_string }}
|
||||
</a>
|
||||
{# or in renderbox mode
|
||||
{{ p.person|chill_entity_render_box({'render': 'label', 'addAltNames': false, 'addLink': true, 'hLevel': 5 }) }}
|
||||
#}
|
||||
<span class="wl-item">
|
||||
{% include '@ChillMain/OnTheFly/_insert_vue_onthefly.html.twig' with {
|
||||
action: 'show', displayBadge: true,
|
||||
targetEntity: { name: 'person', id: p.person.id },
|
||||
buttonText: p.person|chill_entity_render_string
|
||||
} %}
|
||||
</span>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
@@ -13,6 +13,7 @@
|
||||
openPanesInModal: false,
|
||||
stickyActions: true,
|
||||
useValidFrom: true,
|
||||
useValidTo: true,
|
||||
} %}
|
||||
</div>
|
||||
|
||||
|
@@ -22,10 +22,8 @@
|
||||
buttonSize: 'btn-lg',
|
||||
buttonText: 'Move household',
|
||||
modalTitle: 'Move household',
|
||||
} %}
|
||||
{#
|
||||
useValidFrom: true,
|
||||
#}
|
||||
} %}
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
|
@@ -38,6 +38,7 @@
|
||||
buttonText: 'Move household',
|
||||
modalTitle: 'Move household',
|
||||
buttonDisplayText: false,
|
||||
useValidFrom: true,
|
||||
} %}
|
||||
</li>
|
||||
<li class="list-inline-item">
|
||||
@@ -133,7 +134,7 @@
|
||||
{% 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>
|
||||
class="btn btn-sm btn-misc" title="{{ 'household.person.leave'|trans }}"><i class="fa fa-scissors"></i></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ chill_path_add_return_path('chill_person_household_members_editor', {'persons': [ member.person.id ], 'household': household.id} ) }}"
|
||||
@@ -146,7 +147,7 @@
|
||||
{% for m in members %}
|
||||
{% include '@ChillPerson/Household/_render_member.html.twig' with {
|
||||
'member': m,
|
||||
'customButtons': { 'after': _self.customButtons(m, household) }
|
||||
'customButtons': { 'before': _self.customButtons(m, household) }
|
||||
} %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
@@ -4,176 +4,163 @@
|
||||
|
||||
{% block title 'household.Household history for person'|trans %}
|
||||
|
||||
{% macro bloc_content(p) %}
|
||||
<div class="item-row">
|
||||
<div class="wrap-header">
|
||||
<div class="wh-row">
|
||||
<div class="wh-col">
|
||||
<h3>
|
||||
<i class="fa fa-home"></i>
|
||||
<a href="{{ chill_path_add_return_path('chill_person_household_summary',{ 'household_id': p.household.id }) }}">
|
||||
{{ 'household.Household number'|trans({'household_num': p.household.id }) }}
|
||||
</a>
|
||||
</h3>
|
||||
</div>
|
||||
<div class="wh-col">
|
||||
Depuis le {{ p.startDate|format_date('long') }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="wh-row">
|
||||
<div class="wh-col"></div>
|
||||
{% if p.endDate %}
|
||||
<div class="wh-col">
|
||||
Jusqu'au {{ p.endDate|format_date('long') }}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item-row separator">
|
||||
<div class="wrap-list">
|
||||
<div class="wl-row">
|
||||
<div class="wl-col title">
|
||||
<h3>En tant que</h3>
|
||||
</div>
|
||||
<div class="wl-col list">
|
||||
<p class="item">{{ p.position.label|localize_translatable_string }}
|
||||
{% if p.holder %}
|
||||
<span class="holder">{{ 'household.holder'|trans }}</span>
|
||||
{% endif %}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wl-row">
|
||||
<div class="wl-col title">
|
||||
<h3>{{ 'household.Members at same time'|trans }}</h3>
|
||||
</div>
|
||||
<div class="wl-col list">
|
||||
{% set simultaneous = p.household.getMembersDuringMembership(p) %}
|
||||
{% if simultaneous|length == 0 %}
|
||||
<p class="chill-no-data-statement">
|
||||
{{ 'household.Any simultaneous members'|trans }}
|
||||
</p>
|
||||
{% else %}
|
||||
{% for m in simultaneous -%}
|
||||
{% include '@ChillMain/OnTheFly/_insert_vue_onthefly.html.twig' with {
|
||||
action: 'show', displayBadge: true,
|
||||
targetEntity: { name: 'person', id: m.person.id },
|
||||
buttonText: m.person|chill_entity_render_string
|
||||
} %}
|
||||
{%- endfor -%}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
{% block personcontent %}
|
||||
<div class="person-household">
|
||||
<h1>{{ 'household.Household history'|trans }}</h1>
|
||||
|
||||
<h1>{{ 'household.Household history'|trans }}</h1>
|
||||
<h2>{{ 'household.Household shared'|trans }}</h2>
|
||||
<div class="household_shared">
|
||||
<h2 class="chill-blue">{{ 'household.Household shared'|trans }}</h2>
|
||||
{% set memberships = person.getHouseholdParticipationsShareHousehold() %}
|
||||
|
||||
{% set memberships = person.getHouseholdParticipationsShareHousehold() %}
|
||||
{% if memberships|length == 0 %}
|
||||
<p class="chill-no-data-statement">{{ 'household.Never in any household'|trans }}</p>
|
||||
|
||||
{% if memberships|length == 0 %}
|
||||
<p class="chill-no-data-statement">{{ 'household.Never in any household'|trans }}</p>
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a class="btn btn-misc" href="{{chill_path_add_return_path('chill_person_household_members_editor', { 'persons': [ person.id ]}) }}">
|
||||
<i class="fa fa-sign-in fa-fw"></i>
|
||||
{{ 'household.Join'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
{% else %}
|
||||
<div class="flex-table">
|
||||
{% for p in memberships %}
|
||||
<div class="item-bloc">
|
||||
|
||||
{{ _self.bloc_content(p) }}
|
||||
|
||||
<div class="item-row separator">
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a href="{{ chill_path_add_return_path('chill_person_household_summary',{ 'household_id': p.household.id }) }}"
|
||||
class="btn btn-show" title="{{ 'Show'|trans }}"></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ chill_path_add_return_path('chill_person_household_member_edit', { id: p.id }) }}"
|
||||
class="btn btn-edit" title="{{ 'Edit'|trans }}"></a>
|
||||
</li>
|
||||
{% if p.isCurrent() %}
|
||||
<li>
|
||||
<a class="btn btn-misc" href="{{ chill_path_add_return_path( 'chill_person_household_members_editor', { 'persons': [ person.id ], 'allow_leave_without_household': true }) }}">
|
||||
<i class="fa fa-scissors"></i>
|
||||
{{ 'household.Leave'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
{% if not person.isSharingHousehold() %}
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a class="btn btn-misc" href="{{chill_path_add_return_path('chill_person_household_members_editor', { 'persons': [ person.id ], 'followAfter': 'true'}) }}">
|
||||
<i class="fa fa-sign-out"></i>
|
||||
<i class="fa fa-sign-in fa-fw"></i>
|
||||
{{ 'household.Join'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
{% else %}
|
||||
|
||||
<div class="household">
|
||||
<div class="household__address">
|
||||
|
||||
{% if not person.isSharingHousehold() %}
|
||||
<div class="row">
|
||||
<div class="household__address--date"></div>
|
||||
<div class="household__address--content">
|
||||
<div class="cell">
|
||||
<a class="btn btn-misc" href="{{ chill_path_add_return_path('chill_person_household_members_editor', { 'persons': [ person.id ]}) }}">
|
||||
<i class="fa fa-sign-out"></i>
|
||||
{{ 'household.Join'|trans }}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% for p in memberships %}
|
||||
<div class="row">
|
||||
<div class="household__address--date">
|
||||
<div class="cell">
|
||||
<div class="pill">
|
||||
{{ p.startDate|format_date('long') }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="household__address--content">
|
||||
<div class="cell">
|
||||
<i class="dot"></i>
|
||||
<div>
|
||||
<div>
|
||||
<p>
|
||||
<i class="fa fa-home"></i>
|
||||
<a href="{{ chill_path_add_return_path('chill_person_household_summary',{ 'household_id': p.household.id }) }}">
|
||||
{{ 'household.Household number'|trans({'household_num': p.household.id }) }}
|
||||
</a>
|
||||
</p>
|
||||
<p>{{ p.position.label|localize_translatable_string }} {% if p.holder %}<span class="badge bg-primary">{{ 'household.holder'|trans }}</span>{% endif %}
|
||||
</div>
|
||||
<div>
|
||||
{% set simultaneous = p.household.getMembersDuringMembership(p) %}
|
||||
{% if simultaneous|length == 0 %}
|
||||
<p class="chill-no-data-statement">
|
||||
{{ 'household.Any simultaneous members'|trans }}
|
||||
</p>
|
||||
{% else %}
|
||||
{{ 'household.Members at same time'|trans }}:
|
||||
{% for p in simultaneous -%}
|
||||
{{- p.person|chill_entity_render_box({'addLink': true }) -}}
|
||||
{%- if p.holder %} <span class="badge bg-primary">{{'household.holder'|trans }}</span> {% endif %}
|
||||
{%- if not loop.last %}, {% endif -%}
|
||||
{%- endfor -%}
|
||||
{% endif %}
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a href="{{ chill_path_add_return_path('chill_person_household_member_edit', { id: p.id }) }}"
|
||||
class="btn btn-edit"></a>
|
||||
</li>
|
||||
{% if p.isCurrent() %}
|
||||
<li>
|
||||
<a class="btn btn-misc" href="{{ chill_path_add_return_path( 'chill_person_household_members_editor', { 'persons': [ person.id ], 'allow_leave_without_household': true }) }}">
|
||||
<i class="fa fa-sign-out"></i>
|
||||
{{ 'household.Leave'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<h2>{{ 'household.Household not shared'|trans }}</h2>
|
||||
{% endif %}
|
||||
|
||||
{% set memberships = person.getHouseholdParticipationsNotShareHousehold() %}
|
||||
</div>
|
||||
<div class="household_not_shared">
|
||||
{% set memberships = person.getHouseholdParticipationsNotShareHousehold() %}
|
||||
{% if memberships|length > 0 %}
|
||||
|
||||
{% if memberships|length == 0 %}
|
||||
<p class="chill-no-data-statement">{{ 'household.Never in any household'|trans }}</p>
|
||||
{% else %}
|
||||
<table class="table table-bordered border-dark">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ 'household.from'|trans }}</th>
|
||||
<th>{{ 'household.to'|trans }}</th>
|
||||
<th>{{ 'household.Household'|trans }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for p in memberships %}
|
||||
<tr>
|
||||
<td>{{ p.startDate|format_date('long') }}</td>
|
||||
<td>
|
||||
{% if p.endDate is not empty %}
|
||||
{{ p.endDate|format_date('long') }}
|
||||
{% else %}
|
||||
{{ 'household.Membership currently running'|trans }}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
<div>
|
||||
<p>
|
||||
<i class="fa fa-home"></i>
|
||||
<a href="{{ chill_path_add_return_path('chill_person_household_summary', { 'household_id': p.household.id }) }}">
|
||||
{{ 'household.Household number'|trans({'household_num': p.household.id }) }}
|
||||
</a>
|
||||
</p>
|
||||
<p>
|
||||
{{ p.position.label|localize_translatable_string }}
|
||||
{% if p.holder %}
|
||||
<span class="badge bg-primary">{{ 'household.holder'|trans }}</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div>
|
||||
{% set simultaneous = p.household.getMembersDuringMembership(p) %}
|
||||
{% if simultaneous|length == 0 %}
|
||||
<p class="chill-no-data-statement">
|
||||
{{ 'household.Any simultaneous members'|trans }}
|
||||
</p>
|
||||
{% else %}
|
||||
{{ 'household.Members at same time'|trans }}:
|
||||
{% for p in simultaneous -%}
|
||||
{{- p.person|chill_entity_render_box({'addLink': true }) -}}
|
||||
{%- if p.holder %} <span class="badge bg-primary">{{'household.holder'|trans }}</span> {% endif %}
|
||||
{%- if not loop.last %}, {% endif -%}
|
||||
{%- endfor -%}
|
||||
{% endif %}
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul class="record_actions sticky-form-buttons">
|
||||
<li>
|
||||
<a href="{{ chill_path_add_return_path('chill_person_household_member_edit', { id: p.id }) }}"
|
||||
class="btn btn-edit">
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% endif %}
|
||||
<h2 class="chill-blue">{{ 'household.Household not shared'|trans }}</h2>
|
||||
|
||||
<div class="flex-table">
|
||||
{% for p in memberships %}
|
||||
<div class="item-bloc">
|
||||
|
||||
{{ _self.bloc_content(p) }}
|
||||
|
||||
<div class="item-row separator">
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a href="{{ chill_path_add_return_path('chill_person_household_member_edit', { id: p.id }) }}"
|
||||
class="btn btn-edit" title="{{ 'Edit'|trans }}"></a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
Reference in New Issue
Block a user