{% extends "email/base.html" %}

{% block body %}
    <p>Добрый день!</p>
    <p>
        <a href="{{ staff_url }}{{ initiator.username }}">{{ initiator.full_name }}</a>
        отредактировал{% if initiator.gender == 'female' %}а{% endif %}
        вакансию <a href="{{ femida_url }}vacancies/{{ instance.id }}">{{ instance.composite_name }}</a>.
    </p>

    {% if diff %}
    <hr/>
    <p>
        {% for field_name, rows in diff %}
            <b>{{ field_name }}:</b>
            {% if not rows|length_is:1 %}<br/>{% endif %}
            {% for row in rows %}
                {% for sign, text in row %}
                    {% if sign == '+' %}
                        <span style="text-decoration: none; display: inline; background: #e6ffe6;">{{ text }}</span>
                    {% elif sign == '-' %}
                        <span style="text-decoration: none; display: inline; background: #ffe6e6;">{{ text }}</span>
                    {% elif sign == '=' %}
                        <span>{{ text }}</span>
                    {% endif %}
                {% endfor %}
                {% if not forloop.last %}<br/>{% endif %}
            {% endfor %}
            <br>
        {% endfor %}
    </p>
    {% endif %}
{% endblock %}
