mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
improve banner
This commit is contained in:
parent
ed891b224f
commit
f27957e91b
@ -98,7 +98,7 @@ class Household
|
||||
return $this->members;
|
||||
}
|
||||
|
||||
public function getCurrentMembers(\DateTimeImmutable $now = null): Collection
|
||||
public function getCurrentMembers(?\DateTimeImmutable $now = null): Collection
|
||||
{
|
||||
$criteria = new Criteria();
|
||||
$expr = Criteria::expr();
|
||||
@ -118,6 +118,19 @@ class Household
|
||||
return $this->getMembers()->matching($criteria);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the persons currently associated to the household.
|
||||
*
|
||||
* Return a list of Person, instead of a list of HouseholdMembers
|
||||
*
|
||||
* @return Person[]
|
||||
*/
|
||||
public function getCurrentPersons(?\DateTimeImmutable $now = null): Collection
|
||||
{
|
||||
return $this->getCurrentMembers($now)
|
||||
->map(function(HouseholdMember $m) { return $m->getPerson(); });
|
||||
}
|
||||
|
||||
public function getNonCurrentMembers(\DateTimeImmutable $now = null): Collection
|
||||
{
|
||||
$criteria = new Criteria();
|
||||
|
@ -7,9 +7,11 @@
|
||||
{%- for n in person.altNames -%}
|
||||
{%- if loop.first -%}({% else %} {%- endif -%}
|
||||
<span class="chill-entity__person__alt-name chill-entity__person__altname--{{ n.key }}">
|
||||
{{ n.label }}
|
||||
{{- n.label -}}
|
||||
</span>
|
||||
{%- if loop.last %}) {% endif -%}
|
||||
{%- if loop.last -%}) {%- endif -%}
|
||||
{%- endfor -%}
|
||||
{%- endif -%}
|
||||
{%- if showLink is defined -%}</a>{%- endif -%}</span>
|
||||
{%- if showLink is defined -%}</a>{%- endif -%}
|
||||
{#- tricks to remove easily whitespace after template -#}
|
||||
{%- if true -%}</span>{%- endif -%}
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
{%- set members = household.currentMembersByPosition(p) %}
|
||||
{% if members|length > 0 %}
|
||||
<div class="household-list-members flex-table list-with-period">
|
||||
<div class="flex-table list-household-members">
|
||||
{% for m in members %}
|
||||
<div class="item-bloc">
|
||||
<div class="item-row person">
|
||||
@ -75,7 +75,7 @@
|
||||
</button>
|
||||
|
||||
<div id="nonCurrent_{{ p.id }}" class="collapse">
|
||||
<div class="household-list-members flex-table list-with-period">
|
||||
<div class="flex-table list-household-members">
|
||||
{% for m in members %}
|
||||
<div class="item-bloc">
|
||||
<div class="item-row person">
|
||||
@ -127,5 +127,12 @@
|
||||
{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
<ul class="record_actions sticky-form-buttons">
|
||||
<li>
|
||||
<a class="sc-button bt-create">
|
||||
{{ 'household.Add a member'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
{% endblock %}
|
||||
|
@ -16,7 +16,7 @@
|
||||
<p>{{ 'household.Those members does not share address'|trans }}</p>
|
||||
{% endif %}
|
||||
|
||||
<div class="household-list-members flex-table list-with-period">
|
||||
<div class="flex-table list-household-members--summary">
|
||||
{% for m in members %}
|
||||
<div class="item-bloc">
|
||||
<div class="item-row person">
|
||||
|
@ -29,3 +29,9 @@ household:
|
||||
Current household members: Membres actuels du ménage
|
||||
Household summary: Résumé
|
||||
Addresses: Adresses
|
||||
and x other persons: >-
|
||||
{x, plural,
|
||||
one {et une autre personne}
|
||||
many {et # autres personnes}
|
||||
other {et # autres personnes}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user