{% load helpers %}
{% load i18n %}

<div class="card">
  <h2 class="card-header">
    {% trans "Images" %}
    {% if perms.extras.add_imageattachment %}
      <div class="card-actions">
        <a href="{% url 'extras:imageattachment_add' %}?object_type={{ object|content_type_id }}&object_id={{ object.pk }}&return_url={{ object.get_absolute_url }}" class="btn btn-ghost-primary btn-sm">
          <i class="mdi mdi-plus-thick" aria-hidden="true"></i> {% trans "Attach an image" %}
        </a>
      </div>
    {% endif %}
  </h2>
  {% htmx_table 'extras:imageattachment_list' object_type_id=object|content_type_id object_id=object.pk %}
</div>
