<div class="card">
    <div class="card-header">
        Activity Feed
    </div>
    <ul class="list-group list-group-flush">
        {% for log in activity_logs %}
            {% with log.get_action_badge as badge %}
            <li class="list-group-item">
                <strong>{{ log.actor.email }}</strong>
                <span class="badge {{ badge.0 }}" data-bs-toggle="tooltip" data-bs-html="true" title="{% if log.details %}{% if 'updated' in log.action %}{% for key, value in log.details.items %}<b>{{ key }}</b>: {{ value.old }} -> {{ value.new }}<br>{% endfor %}{% else %}{{ log.details.name }}{% endif %}{% endif %}">{{ badge.1 }}</span>
                a {{ log.content_object.__class__.__name__ }}
                -
                <small title="{{ log.timestamp }}">{{ log.timestamp|timesince }} ago</small>
            </li>
            {% endwith %}
        {% empty %}
            <li class="list-group-item">No recent activity.</li>
        {% endfor %}
    </ul>
</div>
