{% load admin_urls %}


<div class="btn-square-group">
  {% block tools %}
    {% with absolute_url=result.obj.get_absolute_url %}
      {% if not cl.is_popup and cl.model_admin.view_on_site and absolute_url %}
        <a href="{{ absolute_url }}" class="btn btn-square btn-sm btn-square--info"
           data-toggle="tooltip" data-placement="top" data-trigger="hover"
           data-html="true" title="{{ _("View on site") }}"
           target="_blank" rel="noopener">
          <i class="fa fa-eye"></i>
        </a>
      {% endif %}
    {% endwith %}

    {% if not cl.is_popup and result.has_view_permission and cl.model_admin.object_history %}
      {% url cl.opts|admin_urlname:'history' result.obj.pk|admin_urlquote as history_url %}
      <a href="{{ history_url }}" class="btn btn-square btn-sm btn-square--info"
         data-toggle="tooltip" data-placement="top" data-trigger="hover"
         data-html="true" title="{{ _("History") }}">
        <i class="fa fa-history"></i>
      </a>
    {% endif %}

    {% if result.has_delete_permission %}
      {% url cl.opts|admin_urlname:'delete' result.obj.pk|admin_urlquote as delete_url %}
      <a href="{{ delete_url }}" class="btn btn-square btn-sm btn-square--danger"
         data-toggle="tooltip" data-placement="top" data-trigger="hover"
         data-html="true" title="{{ _("Delete") }}">
        <i class="fa fa-trash"></i>
      </a>
    {% endif %}
  {% endblock %}
</div>
