mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-05 14:25:00 +00:00
add a render template for entity ThirdParty
This commit is contained in:
@@ -1,49 +1,5 @@
|
||||
{%- macro _render(contact, options) -%}
|
||||
{%- set options = { 'with_valid_from' : true }|merge(options|default({})) -%}
|
||||
<div class="chill_contact">
|
||||
|
||||
<div class="chill_contact_name">
|
||||
{{ contact.name }}
|
||||
</div>
|
||||
<div class="chill_contact_category">
|
||||
{% for type in contact.type %}
|
||||
<span class="category">
|
||||
{{ ('chill_3party.key_label.'~type)|trans }}
|
||||
</span>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% if contact.comment is not empty %}
|
||||
<div class="chill_contact_comment">
|
||||
{{ contact.comment }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if contact.address %}
|
||||
<div class="chill_address">
|
||||
<div class="chill_address_address">
|
||||
|
||||
{% if contact.address.streetAddress1 %}<p class="street street1">{{ contact.address.streetAddress1 }}</p>{% endif %}
|
||||
{% if contact.address.streetAddress2 is not empty %}<p class="street street2">{{ contact.address.streetAddress2 }}</p>{% endif %}
|
||||
{% if contact.address.postCode is not empty %}
|
||||
<p class="postalCode"><span class="code">{{ contact.address.postCode.code }}</span> <span class="name">{{ contact.address.postCode.name }}</span></p>
|
||||
<p class="country">{{ contact.address.postCode.country.name|localize_translatable_string }}</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
{%- if options['with_valid_from'] == true -%}
|
||||
<span class="address_since">{{ 'Since %date%'|trans( { '%date%' : contact.address.validFrom|localizeddate('long', 'none') } ) }}</span>
|
||||
{%- endif -%}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if contact.email or contact.telephone is not empty %}
|
||||
<div class="chill_contact_contact">
|
||||
<span class="email">
|
||||
{{ contact.email }}
|
||||
</span>
|
||||
<span class="telephone">
|
||||
{{ contact.telephone }}
|
||||
</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{{ contact|chill_entity_render_box(options|default({})) }}
|
||||
{%- endmacro -%}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user