mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-10-01 02:49:42 +00:00
household summary: put member box in a reused include template
This commit is contained in:
@@ -0,0 +1,65 @@
|
||||
{% macro addHolder(holder) %}
|
||||
{% if holder %}
|
||||
<span class="fa-stack fa-holder" title="{{ 'household.holder'|trans }}">
|
||||
<i class="fa fa-circle fa-stack-1x text-success"></i>
|
||||
<i class="fa fa-stack-1x">T</i>
|
||||
</span>
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
|
||||
<div class="item-bloc">
|
||||
<div class="item-row">
|
||||
<div class="item-col" style="flex-basis: 30%;">
|
||||
{{ member.person|chill_entity_render_box({
|
||||
'render': 'label',
|
||||
'addLink': true,
|
||||
'addInfo': true,
|
||||
'customArea': {
|
||||
'afterLabel': _self.addHolder(member.holder)
|
||||
}
|
||||
}) }}
|
||||
</div>
|
||||
<div class="item-col">
|
||||
<div class="floatbutton top"><div class="box">
|
||||
|
||||
<div class="action">
|
||||
<ul class="record_actions">
|
||||
|
||||
{% if customButtons['before'] is defined %}
|
||||
{{ customButtons['before'] }}
|
||||
{% endif %}
|
||||
|
||||
<li>
|
||||
<a class="btn btn-sm btn-edit"
|
||||
title="{{ 'household.Update membership'|trans }}"
|
||||
href="{{ chill_path_add_return_path('chill_person_household_member_edit', { 'id': member.id }) }}"></a>
|
||||
</li>
|
||||
|
||||
{% if customButtons['after'] is defined %}
|
||||
{{ customButtons['after'] }}
|
||||
{% endif %}
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<ul class="list-content fa-ul small ms-0">
|
||||
{% if member.startDate is not empty %}
|
||||
<li><i class="fa fa-long-arrow-right"></i>
|
||||
{{ 'Since %date%'|trans({'%date%': member.startDate|format_date('short') }) }}</li>
|
||||
{% endif %}
|
||||
{% if member.endDate is not empty %}
|
||||
<li><i class="fa fa-long-arrow-right"></i>
|
||||
{{ 'Until %date%'|trans({'%date%': member.endDate|format_date('short') }) }}</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
|
||||
{% if member.comment is not empty %}
|
||||
<blockquote class="chill-user-quote ms-0 mb-0" style="clear: right">
|
||||
{{ member.comment|chill_markdown_to_html }}
|
||||
</blockquote>
|
||||
{% endif %}
|
||||
|
||||
</div></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
Reference in New Issue
Block a user