{% import '_includes/macros/status.html.twig' as statusTools %}
{% import '_includes/macros/date.html.twig' as dateTools %}

<table>
	<thead>
		<tr>
			<td>Nom</td>
			<td>Status</td>
			<td>Acteur</td>
			<td>Début planifié</td>
			<td>Fin planifiée</td>
			<td>Début réél</td>
			<td>Fin réele</td>
			<td><span class="d-none">Actions</span></td>
		</tr>
	</thead>
	<tbody>
		{% for activity in activities %}
		<tr>
			<td>{{ activity.name }}</td>
			<td>{{ statusTools.statusName(activity.status) }}</td>
			<td>{% if activity.actor is not null %} {{ activity.actor.displayName }}
				{% endif %}</td>
			<td>{% if activity.startDate is not null %} {{ dateTools.euro(activity.startDate) }}
				{% endif %}</td>
			<td>{% if activity.endDate is not null %} {{ dateTools.euro(activity.endDate) }}
				{% endif %}</td>
			<td>{% if activity.realStartDate is not null %} {{ dateTools.euro(activity.realStartDate) }}
				{% endif %}</td>
			<td>{% if activity.realEndDate is not null %} {{ dateTools.euro(activity.realEndDate) }}
				{% endif %}</td>
			<td></td>
		</tr>
		{% endfor %}
	</tbody>
</table>