{% load i18n static %}
<div class="related-widget-wrapper">
    {% include widget.template_name %}
    {% block links %}
        {% if can_change_related %}
        <a class="related-widget-wrapper-link change-related" id="change_id_{{ widget.name }}"
            data-href-template="{{ change_related_template_url }}?{{ url_params }}"
            title="{% blocktrans %}Change selected {{ model }}{% endblocktrans %}">
            <img src="{% static 'admin/img/icon-changelink.svg' %}" width="10" height="10" alt="{% trans 'Change' %}"/>
        </a>
        {% endif %}
        {% if can_add_related %}
        <a class="related-widget-wrapper-link add-related" id="add_id_{{ widget.name }}"
            href="{{ add_related_url }}?{{ url_params }}"
            title="{% blocktrans %}Add another {{ model }}{% endblocktrans %}">
            <img src="{% static 'admin/img/icon-addlink.svg' %}" width="10" height="10" alt="{% trans 'Add' %}"/>
        </a>
        {% endif %}
        {% if can_delete_related %}
        <a class="related-widget-wrapper-link delete-related" id="delete_id_{{ widget.name }}"
            data-href-template="{{ delete_related_template_url }}?{{ url_params }}"
            title="{% blocktrans %}Delete selected {{ model }}{% endblocktrans %}">
            <img src="{% static 'admin/img/icon-deletelink.svg' %}" width="10" height="10" alt="{% trans 'Delete' %}"/>
        </a>
        {% endif %}
    {% endblock %}
</div>
