work on render box and list

This commit is contained in:
2021-10-08 18:28:02 +02:00
parent 72e9346b6b
commit e465170c7b
6 changed files with 27 additions and 2 deletions

View File

@@ -81,6 +81,13 @@
<div class="item-row entity-bloc">
<div class="item-col">
{{ _self.label(thirdparty, options) }}
{% if thirdparty.kind == 'company' %}
<span class="badge bg-info">{{ 'thirdparty.company'|trans }}</span>
{% elseif thirdparty.kind == 'child' %}
<span class="badge bg-chill-red">{{ 'thirdparty.Child'|trans }}</span>
{% elseif thirdparty.kind == 'contact' %}
<span class="badge bg-secondary">{{ 'thirdparty.contact'|trans }}</span>
{% endif %}
</div>
<div class="item-col">
<ul class="list-content fa-ul">
@@ -124,4 +131,17 @@
</ul>
</div>
</div>
{% if options['showContacts'] and thirdparty.activeChildren|length > 0 %}
<div class="item-row">
{{ 'thirdparty.Children'|trans }}&nbsp;:
{% for c in thirdparty.activeChildren %}
{% include '@ChillMain/OnTheFly/_insert_vue_onthefly.html.twig' with {
targetEntity: { name: 'thirdparty', id: c.id },
action: 'show',
displayBadge: true,
buttonText: c|chill_entity_render_string
} %}
{% endfor %}
</div>
{% endif %}
{%- endif -%}

View File

@@ -20,7 +20,9 @@
{{ form_row(form.telephone) }}
{{ form_row(form.email) }}
{% if form.contactDataAnonymous is defined %}
{{ form_row(form.contactDataAnonymous) }}
{% endif %}
{% if form.activeChildren is defined %}
<h2>{{ 'Contacts'|trans }}</h2>

View File

@@ -22,7 +22,7 @@
<div class="flex-table">
{% for tp in third_parties %}
<div class="item-bloc">
{{ tp|chill_entity_render_box({'render': 'bloc', 'addLink': false}) }}
{{ tp|chill_entity_render_box({'render': 'bloc', 'addLink': false, 'showContacts': true }) }}
<div class="item-row separator">
<ul class="record_actions">
{% if is_granted('CHILL_3PARTY_3PARTY_UPDATE', tp) %}