{% load i18n %}
{% if collectionobject.collection.parent %}
  <a href="{% url "apis_core:collections:collectionobjectparent" content_type.id object.id collectionobject.id %}?to={{ request.get_full_path }}"
     hx-get="{% url "apis_core:collections:collectionobjectparent" content_type.id object.id collectionobject.id %}"
     hx-swap="outerHTML"
     class="btn btn-sm btn-outline-dark col-{{ collectionobject.collection.name|slugify }}"
     title="{% blocktranslate %}Click to change to {{ collectionobject.collection.parent }}{% endblocktranslate %}"
     hx-confirm="{% blocktranslate %}Change {{ object }} from {{ collectionobject.collection }} to {{ collectionobject.collection.parent }}?{% endblocktranslate %}">{{ collectionobject.collection }}</a>
{% else %}
  <a class="btn btn-sm btn-outline-dark disabled">{{ collectionobject.collection }}</a>
{% endif %}
