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) %}
|
{% macro customButtons(member, household) %}
|
||||||
<li>
|
<li>
|
||||||
<a href="{{ chill_path_add_return_path('chill_person_household_members_editor', {'persons': [ member.person.id ], 'allow_leave_without_household': true } ) }}"
|
<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>
|
||||||
<li>
|
<li>
|
||||||
<a href="{{ chill_path_add_return_path('chill_person_household_members_editor', {'persons': [ member.person.id ], 'household': household.id} ) }}"
|
<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 %}
|
{% for m in members %}
|
||||||
{% include '@ChillPerson/Household/_render_member.html.twig' with {
|
{% include '@ChillPerson/Household/_render_member.html.twig' with {
|
||||||
'member': m,
|
'member': m,
|
||||||
'customButtons': { 'after': _self.customButtons(m, household) }
|
'customButtons': { 'before': _self.customButtons(m, household) }
|
||||||
} %}
|
} %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
|
@ -4,176 +4,163 @@
|
|||||||
|
|
||||||
{% block title 'household.Household history for person'|trans %}
|
{% 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 %}
|
{% block personcontent %}
|
||||||
<div class="person-household">
|
<div class="person-household">
|
||||||
|
<h1>{{ 'household.Household history'|trans }}</h1>
|
||||||
|
|
||||||
<h1>{{ 'household.Household history'|trans }}</h1>
|
<div class="household_shared">
|
||||||
<h2>{{ 'household.Household shared'|trans }}</h2>
|
<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 %}
|
<ul class="record_actions">
|
||||||
<p class="chill-no-data-statement">{{ 'household.Never in any household'|trans }}</p>
|
<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">
|
<ul class="record_actions">
|
||||||
<li>
|
<li>
|
||||||
<a class="btn btn-misc" href="{{chill_path_add_return_path('chill_person_household_members_editor', { 'persons': [ person.id ]}) }}">
|
<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 }}
|
{{ 'household.Join'|trans }}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</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 %}
|
{% 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 %}
|
<h2 class="chill-blue">{{ 'household.Household not shared'|trans }}</h2>
|
||||||
<p class="chill-no-data-statement">{{ 'household.Never in any household'|trans }}</p>
|
|
||||||
{% else %}
|
<div class="flex-table">
|
||||||
<table class="table table-bordered border-dark">
|
{% for p in memberships %}
|
||||||
<thead>
|
<div class="item-bloc">
|
||||||
<tr>
|
|
||||||
<th>{{ 'household.from'|trans }}</th>
|
{{ _self.bloc_content(p) }}
|
||||||
<th>{{ 'household.to'|trans }}</th>
|
|
||||||
<th>{{ 'household.Household'|trans }}</th>
|
<div class="item-row separator">
|
||||||
</tr>
|
<ul class="record_actions">
|
||||||
</thead>
|
<li>
|
||||||
<tbody>
|
<a href="{{ chill_path_add_return_path('chill_person_household_member_edit', { id: p.id }) }}"
|
||||||
{% for p in memberships %}
|
class="btn btn-edit" title="{{ 'Edit'|trans }}"></a>
|
||||||
<tr>
|
</li>
|
||||||
<td>{{ p.startDate|format_date('long') }}</td>
|
</ul>
|
||||||
<td>
|
</div>
|
||||||
{% if p.endDate is not empty %}
|
|
||||||
{{ p.endDate|format_date('long') }}
|
</div>
|
||||||
{% else %}
|
{% endfor %}
|
||||||
{{ 'household.Membership currently running'|trans }}
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</td>
|
</div>
|
||||||
<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 %}
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user