mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
refund template design for person household_history
This commit is contained in:
parent
f4fe297765
commit
48f62a2a17
@ -133,7 +133,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 +146,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,12 +4,77 @@
|
||||
|
||||
{% 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>
|
||||
<h2>{{ 'household.Household shared'|trans }}</h2>
|
||||
|
||||
<div class="household_shared">
|
||||
<h2 class="chill-blue">{{ 'household.Household shared'|trans }}</h2>
|
||||
{% set memberships = person.getHouseholdParticipationsShareHousehold() %}
|
||||
|
||||
{% if memberships|length == 0 %}
|
||||
@ -18,162 +83,84 @@
|
||||
<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-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 %}
|
||||
|
||||
<div class="flex-table">
|
||||
{% 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 %}
|
||||
<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"></a>
|
||||
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-sign-out"></i>
|
||||
<i class="fa fa-scissors"></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 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">
|
||||
{% if not person.isSharingHousehold() %}
|
||||
<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 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>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
<div class="household_not_shared">
|
||||
{% set memberships = person.getHouseholdParticipationsNotShareHousehold() %}
|
||||
{% if memberships|length > 0 %}
|
||||
|
||||
<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 %}
|
||||
|
Loading…
x
Reference in New Issue
Block a user