{% extends "balafon/bs_base.html" %} {% load i18n %} {% block extra_head %} {{block.super}} {{form.media}} {% endblock %} {% block document_content %}

{% trans "Confirm contacts import" %}

{% csrf_token %} {% include "bs/form_fields.html" %}
{% if not contacts %}
{% blocktrans %}No new contacts to import ({{total_contacts }} in csv file){% endblocktrans %}
{% else %}
{% blocktrans %}It imports only contacts if their email doesn't already exists ({{nb_contacts}} on {{total_contacts }} in csv file)

Caption:
* Gray background : Already exists
* Orange background : will be created
* Red background : The city will be created with default department as parent
* Blue background : The email is already known in the database
{% endblocktrans %}
{% for c in contacts %} {% if c.entity %} {% else %} {% endif %} {% if c.entity_type %} {% else %} {% endif %} {% if c.entity_city %} {% if c.entity_city_exists %} {% else %} {% if c.entity_zip_code %} {% else %} {% endif %} {% endif %} {% else %} {% endif %} {% if c.city %} {% if c.city_exists %} {% else %} {% if c.zip_code %} {% else %} {% endif %} {% endif %} {% else %} {% endif %} {% if c.entity_groups %} {% else %} {% endif %} {% if c.contact_groups %} {% else %} {% endif %} {% if c.roles %} {% else %} {% endif %} {% endfor %}
{% trans "Entity" %} {% trans "Entity type" %} {% trans "Gender" %} {% trans "Lastname" %} {% trans "Firstname" %} {% trans "Email" %} {% trans "Entity city" %} {% trans "Contact city" %} {% trans "Entity groups" %} {% trans "Contact groups" %} {% trans "Roles" %}
{{c.entity}} {{c.entity_type}} {{c.get_gender_text|default:" "}} {{c.lastname|default:" "}} {{c.firstname|default:" "}} {{c.email|default:" "}}{{c.entity_city}}{{c.entity_city}} ({{c.entity_zip_code|slice:":2"}}){{c.entity_city}} {{c.city}}{{c.city}} ({{c.zip_code|slice:":2"}}){{c.city}}  {% for g in c.entity_groups %} {{g.name}} {% if not forloop.last %};{% endif %} {% endfor %}   {% for g in c.contact_groups %} {{g.name}} {% if not forloop.last %};{% endif %} {% endfor %}   {% for r in c.roles %} {{r.name}} {% if not forloop.last %};{% endif %} {% endfor %}  
{% endif %}
{% endblock %}