{# Badge to display a project/category link #}
{# DEPRECATED: to be removed in SODAR Core v1.3 #}
{# Use the get_project_badge() template tag instead #}

{# Parameters: #}
{# project (Project object) #}
{# color (string) #}
{# can_view (boolean) #}
<span class="badge sodar-obj-badge sodar-project-badge mr-1
             badge-{% if not can_view %}secondary{% else %}{{ color|lower }}{% endif %}"
      title="{{ project.full_title }}" data-toggle="tooltip">
  <i class="iconify"
     data-icon="{% if project.is_project %}mdi:cube{% else %}mdi:rhombus-split{% endif %}">
  </i>
  {% if can_view %}
    <a href="{% url 'projectroles:detail' project=project.sodar_uuid %}">
      {{ project.title }}
    </a>
  {% else %}
    {{ project.title }}
  {% endif %}
</span>
