mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 22:53:49 +00:00
Historique ménage pour une personne
This commit is contained in:
@@ -86,3 +86,83 @@ div.person-view {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* HOUSEHOLD
|
||||
*/
|
||||
|
||||
|
||||
div.household__address, div.person__address {
|
||||
div.row {
|
||||
height: 100px;
|
||||
width: 100%;
|
||||
position: relative;
|
||||
& > div {
|
||||
position: absolute;
|
||||
display: table;
|
||||
height: 100%;
|
||||
border: 1px dotted #c3c3c3;
|
||||
}
|
||||
div.household__address--date, div.person__address--date {
|
||||
width: 30%;
|
||||
background-color: #c3c3c3;
|
||||
height: 100%;
|
||||
div.cell {
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
margin-left: 50%;
|
||||
div.pill {
|
||||
position: absolute;
|
||||
box-sizing: border-box;
|
||||
width: 120px;
|
||||
height: 40px;
|
||||
bottom: -20px;
|
||||
background-color: white;
|
||||
padding: 10px;
|
||||
border-radius: 30px;
|
||||
left: -60px;
|
||||
text-align: center;
|
||||
z-index: 10;
|
||||
}
|
||||
}
|
||||
}
|
||||
div.household__address--content, div.person__address--content {
|
||||
width: 70%;
|
||||
left: 30%;
|
||||
text-align: left;
|
||||
background-color: #ececec;
|
||||
border: 1px solid #888;
|
||||
div.cell {
|
||||
display: table-cell;
|
||||
padding: 5px 30px;
|
||||
vertical-align: middle;
|
||||
& > div {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
i.dot::before, i.dot::after {
|
||||
position: absolute;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
content: '';
|
||||
border: 0;
|
||||
background-color: white;
|
||||
border-radius: 50%;
|
||||
border: 5px solid #c3c3c3;
|
||||
z-index: 10;
|
||||
left: -15px;
|
||||
bottom: -15px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
div.household__address-move {
|
||||
div.household__address-move__create {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
}
|
||||
|
@@ -0,0 +1,213 @@
|
||||
{% extends "@ChillPerson/layout.html.twig" %}
|
||||
|
||||
{% set activeRouteKey = 'chill_person_view' %}
|
||||
|
||||
{% block title 'household.Household history for %name%'|trans({'name': person|chill_entity_render_string}) %}
|
||||
|
||||
|
||||
{% block personcontent %}
|
||||
<h1>{{ block('title') }}</h1>
|
||||
|
||||
<h2>{{ 'household.Household shared'|trans }}</h2>
|
||||
|
||||
{% set memberships = person.getHouseholdParticipationsShareHousehold() %}
|
||||
|
||||
{% if memberships|length == 0 %}
|
||||
<p class="chill-no-data-statement">{{ 'household.Never in any household'|trans }}</p>
|
||||
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a class="sc-button"
|
||||
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>
|
||||
</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="sc-button"
|
||||
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 badge-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 badge-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="sc-button bt-edit"
|
||||
></a>
|
||||
</li>
|
||||
{% if p.isCurrent() %}
|
||||
<li>
|
||||
<a class="sc-button"
|
||||
href="{{ chill_path_add_return_path(
|
||||
'chill_person_household_members_editor',
|
||||
{ 'persons': [ person.id ], 'allow_leave_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>
|
||||
|
||||
{% set memberships = person.getHouseholdParticipationsNotShareHousehold() %}
|
||||
|
||||
{% if memberships|length == 0 %}
|
||||
<p class="chill-no-data-statement">{{ 'household.Never in any household'|trans }}</p>
|
||||
{% else %}
|
||||
<table>
|
||||
<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 badge-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 badge-primary">{{'household.holder'|trans }}</span> {% endif %}
|
||||
{%- if not loop.last %}, {% endif -%}
|
||||
{%- endfor -%}
|
||||
{% endif %}
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<ul class="record_actions">
|
||||
{% if p.isCurrent() %}
|
||||
<li>
|
||||
<a class="sc-button"
|
||||
href="{{ chill_path_add_return_path(
|
||||
'chill_person_household_members_editor',
|
||||
{ 'persons': [ person.id ], 'allow_leave_household': true }) }}"
|
||||
>
|
||||
<i class="fa fa-sign-out"></i>
|
||||
{{ 'household.Leave'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
<li>
|
||||
<a
|
||||
href="{{ chill_path_add_return_path('chill_person_household_member_edit', { id: p.id }) }}"
|
||||
class="sc-button bt-edit"
|
||||
></a>
|
||||
</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
Reference in New Issue
Block a user