diff --git a/src/Bundle/ChillMainBundle/translations/messages.fr.yml b/src/Bundle/ChillMainBundle/translations/messages.fr.yml index d2add7737..a9ca52593 100644 --- a/src/Bundle/ChillMainBundle/translations/messages.fr.yml +++ b/src/Bundle/ChillMainBundle/translations/messages.fr.yml @@ -56,6 +56,7 @@ centers: centres Centers: Centres comment: commentaire Comment: Commentaire +Any comment: Aucun commentaire # comment embeddable No comment associated: Aucun commentaire diff --git a/src/Bundle/ChillThirdPartyBundle/Resources/views/Entity/thirdparty.html.twig b/src/Bundle/ChillThirdPartyBundle/Resources/views/Entity/thirdparty.html.twig index 7768d2913..9d0269d3d 100644 --- a/src/Bundle/ChillThirdPartyBundle/Resources/views/Entity/thirdparty.html.twig +++ b/src/Bundle/ChillThirdPartyBundle/Resources/views/Entity/thirdparty.html.twig @@ -29,7 +29,7 @@
{%- if options['addLink'] and is_granted('CHILL_3PARTY_3PARTY_SHOW', thirdparty) -%} - + {%- 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) -%} {%- 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'] %}
  • + href="{{ path('chill_crud_3party_3party_view', { id: thirdparty.isChild ? thirdparty.parent.id : thirdparty.id }) }}">
  • {% else %} {% endif %} diff --git a/src/Bundle/ChillThirdPartyBundle/Resources/views/ThirdParty/view.html.twig b/src/Bundle/ChillThirdPartyBundle/Resources/views/ThirdParty/view.html.twig index 5209a5f30..1200c3e83 100644 --- a/src/Bundle/ChillThirdPartyBundle/Resources/views/ThirdParty/view.html.twig +++ b/src/Bundle/ChillThirdPartyBundle/Resources/views/ThirdParty/view.html.twig @@ -94,11 +94,38 @@
    {{ thirdParty.comment|chill_markdown_to_html }}
    + {% else %} + {{ 'Any comment'|trans }} + {% endif %} + + +
    {{ 'Contacts'|trans }}
    +
    + {% if thirdParty.activeChildren|length == 0 %} +

    {{ 'Any contacts associated'|trans }}

    + {% else %} +
    + {% for tp in thirdParty.activeChildren %} +
    + {{ tp|chill_entity_render_box({'render': 'bloc', 'addLink': false}) }} +
    + {% endfor %} +
    {% endif %}
    {{ 'Centers'|trans }}
    -
    {{ 'The party is visible in those centers'|trans }} : {{ thirdParty.centers|join(', ') }}
    +
    + {% set centers = thirdParty|chill_resolve_center %} + {% if centers is iterable %} + {{ 'The party is visible in those centers'|trans }} : + {{ centers|join(', ') }} + {% elseif centers is null %} + {{ 'The party is not visible in any center'|trans }} + {% else %} + {{ 'The party is visible in those centers'|trans }} : {{ centers }} + {% endif %} +
    {% endblock %} diff --git a/src/Bundle/ChillThirdPartyBundle/translations/messages.fr.yml b/src/Bundle/ChillThirdPartyBundle/translations/messages.fr.yml index 83131cc23..e370655e4 100644 --- a/src/Bundle/ChillThirdPartyBundle/translations/messages.fr.yml +++ b/src/Bundle/ChillThirdPartyBundle/translations/messages.fr.yml @@ -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