{% load i18n jet_dashboard_tags %}

<ul>
    {% if not module.children %}
        <li>
            {% trans 'None available' %}
        </li>
    {% else %}
        {% for entry in module.children %}
            <li>
                <span class="float-right">
                    <span class="fas fa-user-tie tooltip" title="{{ entry.user }}"></span>
                    <span class="far fa-clock tooltip" title="{{ entry.action_time }}"></span>
                </span>

                <div class="nowrap">
                    {% if entry.is_addition %}
                        <span class="icon fas fa-plus-square"></span>
                    {% endif %}
                    {% if entry.is_change %}
                        <span class="icon fas fa-edit"></span>
                    {% endif %}
                    {% if entry.is_deletion %}
                        <span class="icon fas fa-trash-alt"></span>
                    {% endif %}

                    {% if entry.content_type %}
                        <span>{% filter capfirst %}{{ entry.content_type }}{% endfilter %}</span>
                    {% else %}
                        <span>{% trans 'Unknown content' %}</span>
                    {% endif %}

                    {% if entry.is_deletion or not entry.get_admin_url %}
                        <span class="tooltip" title="{{ entry|format_change_message }}">{{ entry.object_repr }}</span>
                    {% else %}
                        <a title="{{ entry|format_change_message }}" class="tooltip" href="{{ entry.get_admin_url }}">{{ entry.object_repr }}</a>
                    {% endif %}
                </div>
            </li>
        {% endfor %}
    {% endif %}
</ul>
