mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-28 17:44:58 +00:00
thirdparty: improve render for children/parent dependencies in renderbox vue/twig
This commit is contained in:
@@ -84,18 +84,15 @@
|
||||
{{ _self.label(thirdparty, options) }}
|
||||
{% if thirdparty.kind == 'child' %}
|
||||
<span class="badge rounded-pill bg-thirdparty">
|
||||
<i class="fa fa-user fa-fw"></i>
|
||||
{{ 'thirdparty.child'|trans }}
|
||||
<i class="fa fa-fw fa-user"></i>{{ 'thirdparty.child'|trans }}
|
||||
</span>
|
||||
{% elseif thirdparty.kind == 'company' %}
|
||||
<span class="badge rounded-pill bg-thirdparty">
|
||||
<i class="fa fa-hospital-o fa-fw"></i>
|
||||
{{ 'thirdparty.company'|trans }}
|
||||
<i class="fa fa-fw fa-hospital-o"></i>{{ 'thirdparty.company'|trans }}
|
||||
</span>
|
||||
{% else %}
|
||||
<span class="badge rounded-pill bg-thirdparty">
|
||||
<i class="fa fa-user-md fa-fw"></i>
|
||||
{{ 'thirdparty.contact'|trans }}
|
||||
<i class="fa fa-fw fa-user-md"></i>{{ 'thirdparty.contact'|trans }}
|
||||
</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
@@ -175,26 +172,33 @@
|
||||
</div>
|
||||
{% if options['showContacts'] and thirdparty.activeChildren|length > 0 %}
|
||||
<div class="item-row">
|
||||
{{ 'thirdparty.Children'|trans }} :
|
||||
{% 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 class="item-col"></div>
|
||||
<div class="item-col">
|
||||
<h5 class="me-2">{{ 'thirdparty.Children'|trans ~ ': ' }}</h5>
|
||||
{% 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>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if options['showParent'] and thirdparty.isChild %}
|
||||
<div class="item-row">
|
||||
{{ 'thirdparty.Contact of'|trans }} :
|
||||
{% include '@ChillMain/OnTheFly/_insert_vue_onthefly.html.twig' with {
|
||||
targetEntity: { name: 'thirdparty', id: thirdparty.parent.id },
|
||||
action: 'show',
|
||||
displayBadge: true,
|
||||
buttonText: thirdparty.parent|chill_entity_render_string
|
||||
} %}
|
||||
<div class="item-col"></div>
|
||||
<div class="item-col">
|
||||
<h5 class="me-2">{{ 'thirdparty.Contact of'|trans ~ ': ' }}</h5>
|
||||
{% include '@ChillMain/OnTheFly/_insert_vue_onthefly.html.twig' with {
|
||||
targetEntity: { name: 'thirdparty', id: thirdparty.parent.id },
|
||||
action: 'show',
|
||||
displayBadge: true,
|
||||
buttonText: thirdparty.parent|chill_entity_render_string
|
||||
} %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
|
Reference in New Issue
Block a user