{% load timeline_tags %}
{# Projectroles dependency #}
{% load projectroles_common_tags %}

<tr id="sodar-tl-list-event-{{ event.sodar_uuid }}">
  <td>
    {% get_timestamp event as event_time %}
    {% if event.project %}
      <a class="sodar-tl-link-detail text-primary"
         data-url="{% url 'timeline:ajax_detail_project' projectevent=event.sodar_uuid %}">
        {{ event_time }}
      </a>
    {% else %}
      <a class="sodar-tl-link-detail text-primary"
         data-url="{% url 'timeline:ajax_detail_site' projectevent=event.sodar_uuid %}">
        {{ event_time }}
      </a>
    {% endif %}
  </td>
  <td>
    {% get_app_icon_html event plugin_lookup as event_icon %}
    {{ event_icon|safe }}
    {{ event.event_name }}
  </td>
  <td {% if not event.user %}class="text-muted"{% endif %}>
    {% if event.user %}
      {% get_user_html event.user as user_html %}
      {{ user_html|safe }}
    {% else %}
      N/A
    {% endif %}
  </td>
  <td>
    {% get_event_description event plugin_lookup request as event_desc %}
    {{ event_desc|safe }}
    {% if not details_card_mode and event|has_extra_data %}
      <a class="sodar-tl-link-extra text-primary pull-right" tabindex="0"
         data-toggle="modal" data-trigger="focus"
         data-target="#sodar-tl-modal-{{ event.pk }}">
        <i class="iconify" data-icon="mdi:text-box" title="Extra Data"
           data-toggle="tooltip" data-placement="left">
        </i>
      </a>
    {% endif %}
    {% if event.classified %}
      <span class="pull-right text-muted">
        <i class="iconify" data-icon="mdi:lock" title="Classified"
           data-toggle="tooltip" data-placement="left">
        </i>
      </span>
    {% endif %}
  </td>
  <td class="{% get_status_style event.get_current_status %} text-light">
    {{ event.get_current_status.status_type }}
  </td>
</tr>

{% if event|has_extra_data %}
   {% include 'timeline/_extra_data_modal.html' %}
{% endif %}
