page vue des tiers

This commit is contained in:
Julien Fastré 2021-10-08 12:05:50 +02:00
parent 9a708ca618
commit 7812442c9a
4 changed files with 34 additions and 5 deletions

View File

@ -56,6 +56,7 @@ centers: centres
Centers: Centres
comment: commentaire
Comment: Commentaire
Any comment: Aucun commentaire
# comment embeddable
No comment associated: Aucun commentaire

View File

@ -29,7 +29,7 @@
<div class="denomination {{ 'h' ~ options['hLevel'] }}">
{%- if options['addLink'] and is_granted('CHILL_3PARTY_3PARTY_SHOW', thirdparty) -%}
<a href="{{ chill_path_add_return_path('chill_3party_3party_show', { 'thirdparty_id': thirdparty.id }) }}">
<a href="{{ chill_path_add_return_path('chill_crud_3party_3party_view', { 'id': thirdparty.isChild ? thirdparty.parent.id : thirdparty.id }) }}">
{%- endif -%}
{% if options['customArea']['beforeLabel'] is defined %}
@ -41,7 +41,7 @@
{% if options['customArea']['afterLabel'] is defined %}
{{ options['customArea']['afterLabel'] }}
{% endif %}
{%- if options['addLink'] and is_granted('CHILL_3PARTY_3PARTY_SHOW', thirdparty) -%}
</a>
{%- endif -%}
@ -110,10 +110,10 @@
{% if options['customButtons']['replace'] is defined %}
{{ options['customButtons']['replace'] }}
{% elseif is_granted('CHILL_3PARTY_3PARTY_SHOW', thirdparty) %}
{% elseif is_granted('CHILL_3PARTY_3PARTY_SHOW', thirdparty) and options['addLink'] %}
<li>
<a class="btn btn-sm btn-show" target="_blank" title="{{ 'Show thirdparty'|trans }}"
href="{{ path('chill_3party_3party_show', { thirdparty_id: thirdparty.id }) }}"></a>
href="{{ path('chill_crud_3party_3party_view', { id: thirdparty.isChild ? thirdparty.parent.id : thirdparty.id }) }}"></a>
</li>
{% else %}
{% endif %}

View File

@ -94,11 +94,38 @@
<blockquote class="chill-user-quote">
{{ thirdParty.comment|chill_markdown_to_html }}
</blockquote>
{% else %}
<span class="chill-no-data-statement">{{ 'Any comment'|trans }}</span>
{% endif %}
</dd>
<dt>{{ 'Contacts'|trans }}</dt>
<dd>
{% if thirdParty.activeChildren|length == 0 %}
<p class="chill-no-data-statement">{{ 'Any contacts associated'|trans }}</p>
{% else %}
<div class="flex-table">
{% for tp in thirdParty.activeChildren %}
<div class="item-bloc">
{{ tp|chill_entity_render_box({'render': 'bloc', 'addLink': false}) }}
</div>
{% endfor %}
</div>
{% endif %}
</dd>
<dt>{{ 'Centers'|trans }}</dt>
<dd>{{ 'The party is visible in those centers'|trans }}&nbsp;: {{ thirdParty.centers|join(', ') }}</dd>
<dd>
{% set centers = thirdParty|chill_resolve_center %}
{% if centers is iterable %}
{{ 'The party is visible in those centers'|trans }}&nbsp;:
{{ centers|join(', ') }}
{% elseif centers is null %}
{{ 'The party is not visible in any center'|trans }}
{% else %}
{{ 'The party is visible in those centers'|trans }}&nbsp;: {{ centers }}
{% endif %}
</dd>
</dl>
{% endblock %}

View File

@ -56,6 +56,7 @@ No phone given: Aucun téléphone renseigné
No email given: Aucune adresse courriel renseignée
The party is visible in those centers: Le tiers est visible dans ces centres
The party is not visible in any center: Le tiers n'est associé à aucun centre
No third parties: Aucun tiers
# ROLES