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

<tr id="sodar-tl-list-event-{{ event.sodar_uuid }}">
  <td>
    <a class="sodar-tl-link-detail text-primary" tabindex="0"
       data-toggle="popover" data-trigger="focus"
       data-placement="right" data-html="true"
       data-content="{% get_event_details event %}">
      {% get_timestamp event %}
    </a>
  </td>
  <td>
    {% get_app_url event as app_url %}
    {% if app_url != '#' %}
      <a href="{% get_app_url event %}">{{ event.app }}</a>
    {% else %}
      <span class="text-danger">{{ event.app }}</span>
    {% endif %}
  </td>
  <td>{{ 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>
    {% autoescape off %}
      {% get_event_description event request %}
    {% endautoescape %}
    {% 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 %}
