{% spaceless %}
<div class="action-contacts">

  {% for c in action.contacts.all %}
    <span class="label label-bigger label-primary label-action-who">
      <span class="glyphicon glyphicon-user"></span>
      <a style="max-width: 180px;" href="{% url 'crm_view_contact' c.id %}">{{ c.fullname }}</a>
      {% if not c.entity.is_single_contact %}
        &nbsp;
        <a style="max-width: 60px;" href="{% url 'crm_view_entity' c.entity.id %}">({{ c.entity }})</a>
      {% endif %}
      {% if not action.type.hide_contacts_buttons %}
      &nbsp;<a href="{% url 'crm_remove_contact_from_action' action.id c.id %}" class="colorbox-form">
          <span class="glyphicon glyphicon-remove"></span>
      </a>
      {% endif %}
    </span>&nbsp;
  {% endfor %}

  {% for e in action.entities.all %}
    <span class="label label-bigger label-primary label-action-who">
      <span class="glyphicon glyphicon-tower"></span>
      <a style="max-width: 200px;" href="{% url 'crm_view_entity' e.id %}">{{ e }}</a>
      {% if not action.type.hide_contacts_buttons %}
      &nbsp;<a href="{% url 'crm_remove_entity_from_action' action.id e.id %}" class="colorbox-form">
          <span class="glyphicon glyphicon-remove"></span>
      </a>
      {% endif %}
    </span>&nbsp;
  {% endfor %}
</div>
{% endspaceless %}