{% comment %}
Renders the Dropdown Footer plugin's HTML.
{% endcomment %}
{% load i18n %}

{% block code %}
html: function (data) {
    let footer = ''
    footer += `
    <div title="{{ widget.plugins.dropdown_footer.title }}" class="{{ widget.plugins.dropdown_footer.footer_class }}">
        {% if "view_create_url" in widget.keys and widget.view_create_url %}
            <a href="{{ widget.view_create_url }}" title='{% translate "Go to Create View for these items" %}' class="{{ widget.plugins.dropdown_footer.create_view_class }}" target="_blank" rel="noopener noreferrer">{{ widget.plugins.dropdown_footer.create_view_label }}</a>
        {% endif %}

        {% if "view_list_url" in widget.keys and widget.view_list_url %}
            <a href="{{ widget.view_list_url }}" title='{% translate "Go to List View for these items" %}' class="{{ widget.plugins.dropdown_footer.list_view_class }}" target="_blank" rel="noopener noreferrer">{{ widget.plugins.dropdown_footer.list_view_label }}</a>
        {% endif %}
    </div>
    `
    return footer
},
{% endblock code %}
