{% twig_js name="Task" %}

<div
    id="li-task-{{ event.id }}"
    class="list-group-item task-item"
    data-task-id="{{ event.id }}"
    {% if event.workspace_id != null %}
        data-workspace-id="{{ event.workspace_id }}"
    {% else %}
        data-workspace-id="0"
    {% endif %}
>
    {% if event.deletable %}
        <a href="{{ path('claro_agenda_delete_event', {'event': event.id}) }}" class="delete-event close">&times;</a>
    {% endif %}
    <strong data-event-title="{{event.title}}"> {{ event.title }}</strong>

    {% if event.description is not empty %}
        <div style="max-height: 150px; overflow-y: auto;">{{ event.description | raw }}</div>
    {% endif %}

    <div>
        <a href="{{ path('claro_agenda_update_event_form', {'event': event.id}) }}"
           class="edit-event-link"
           role="button"
        >
            {% if event.editable %}
                {{ 'edit'|trans({}, 'platform') }}
            {% endif %}
        </a>
    </div>
</div>