{% extends 'creme_core/bricks/base/hat-card.html' %}{# -*- mode: jinja2 -*- #} {% load i18n creme_core_tags creme_bricks creme_widgets persons_tags verbose_name m2m %} {% block brick_extra_class %}{{block.super}} persons-organisation-card-brick{% endblock %} {% block card_intro_content %} {% include 'persons/bricks/frags/card-last-activity.html' %} {% endblock %} {% block card_main %}
{{object.name}} {{object.est_adherent_annee|yesno:"*,"}}{% if object.legal_form and 'legal_form' not in hidden_fields %}, {{object.legal_form}}{% endif %} {% if not object.is_deleted and not object.sandbox %} {% brick_card_action_for_field instance=object field='name' user=user %} {% endif %} {% include 'creme_core/bricks/frags/hat-card-title-indicators.html' %}
{% if object.is_managed %}
{% trans 'Managed by Creme' %}
{% endif %} {% if is_customer %}
{% trans 'Customer' %}
{% endif %} {% if is_supplier %}
{% trans 'Supplier' %}
{% endif %}
{% endblock %} {% block card_secondary %} {% with managers_count=managers|length employees_count=employees|length electees_count=electees|length %} {% with total_count=managers_count|add:employees_count|add:electees_count %}
{% if total_count >= 15 %} {% if managers_count %}{% blocktrans count count=managers_count %}{{count}} Manager{% plural %}{{count}} Managers{% endblocktrans %}{% endif %} {% if managers_count and employees_count %}, {% endif %} {% if employees_count %}{% blocktrans count count=employees_count %}{{count}} Employee{% plural %}{{count}} Employees{% endblocktrans %}{% endif %} {% if managers_count and electees_count and not employees_count %}, {% endif %} {% if electees_count and employees_count %}, {% endif %} {% if electees_count %}{% blocktrans count count=electees_count %}{{count}} Élu(e){% plural %}{{count}} Élu(e)s{% endblocktrans %}{% endif %} {% else %} {% if managers %}
{% trans 'Manager' %}(s): {% for manager in managers %} {{manager|persons_pretty_contact}}{% if not forloop.last %}, {% endif %} {% endfor %}
{% endif %} {% if employees %}
{% trans 'Employee' %}(s): {% for employee in employees %} {{employee|persons_pretty_contact}}{% if not forloop.last %}, {% endif %} {% endfor %}
{% endif %} {% if electees %}
Élu(s): {% for electee in electees %} {{electee|persons_pretty_contact}}{% if not forloop.last %}, {% endif %} {% endfor %}
{% endif %} {% endif %}
{% endwith %}{% endwith %} {% endblock %} {% block card_fields_title %} {% trans 'Details' context 'persons-organisation' %} {% endblock %} {% block card_fields %}{% has_perm_to change object as edition_perm %} {% if object.import_id %}
Ancienne fiche civicrm {{object.import_id}}
{% endif %} {% if 'phone' not in hidden_fields %}
{% trans 'Phone' %} {{object.get_phone_display|default:'—'}} {% brick_card_action_for_field instance=object field='phone' user=user %}
{% endif %} {% if 'billing_address' not in hidden_fields %}
{% trans 'Address' %} {% with address=object.billing_address %} {% if address is not None %} {% with address_desc=address|persons_pretty_address|linebreaksbr %} {% if address_desc %}{{address_desc}}{% else %}—{% endif %} {% url_join address.get_edit_absolute_url type='billing' as b_uri %}{% brick_card_action url=b_uri enabled=edition_perm %} {% endwith %} {% else %} — {% url 'persons__create_billing_address' object.id as create_baddr_url %}{% brick_card_action url=create_baddr_url enabled=edition_perm %} {% endif %} {% endwith %}
{% endif %} {% if 'email' not in hidden_fields %}
{% trans 'Email' %} {{object.email|default:'—'}} {% brick_card_action_for_field instance=object field='email' user=user %}
{% endif %} {% if 'url_site' not in hidden_fields %}
{% trans 'Web Site' %} {% if object.url_site %} {% endif %} {{object.url_site|default:'—'}} {% if object.url_site %}{% endif %} {% brick_card_action_for_field instance=object field='url_site' user=user %}
{% endif %} {% endblock %} {% block card_summary %} {% if 'activite' not in hidden_fields %}
{% verb object 'activite' %} {{object.activite|default:'—'}} {% brick_card_action_for_field instance=object field='activite' user=user %}
{% endif %} {% if 'activite_secondaire' not in hidden_fields %}
{% verb object 'activite_secondaire' %} {% m2m object 'activite_secondaire' %} {% brick_card_action_for_field instance=object field='activite_secondaire' user=user %}
{% endif %} {% include 'persons/bricks/frags/card-summary-acts.html' %} {% include 'persons/bricks/frags/card-summary-next-activity.html' %} {% endblock %}