{% load i18n admin_urls %}
{% if object.action_logs %}
<div class="card card-body shadow-sm p-4">
  {% for act in object.action_logs %}
    <div>
      <div class="d-flex mb-2">
        <div class="align-items-top d-flex me-3 media">
          <img class="avatar rounded-circle" width="32" height="32" src="{{ act.actor.avatar }}">
        </div>
        <div class="small">
          <strong>{{ act.actor|title }}</strong>
          <div>{{ act.timesince }}</div>
        </div>
      </div>
      <p class="small">
        {{ act.get_note|truncatechars:50 }}
      </p>
    </div>
  {% endfor %}
  <div class="small text-end">
    {% url opts|admin_urlname:'history' object.pk|admin_urlquote as history_url %}
    <a href="{% add_preserved_filters history_url %}">{% trans "More Activities" %}</a>
  </div>
</div>
{% endif %}
