2016-03-22 21:19:16 +01:00

82 lines
2.8 KiB
Twig

{% extends 'ChillEventBundle::layout.html.twig' %}
{% block title 'Event : %label%'|trans({ '%label%' : event.label } ) %}
{% import 'ChillPersonBundle:Person:macro.html.twig' as person_macro %}
{% block event_content -%}
<h1>{{ 'Details of an event'|trans }}</h1>
<table class="record_properties">
<tbody>
<tr>
<th>{{ 'Name'|trans }}</th>
<td>{{ event.label }}</td>
</tr>
<tr>
<th>{{ 'Date'|trans }}</th>
<td>{{ event.date|localizeddate('long', 'none') }}</td>
</tr>
<tr>
<th>{{ 'Event type'|trans }}</th>
<td>{{ event.type.label|localize_translatable_string }}</td>
</tr>
<tr>
<th>{{ 'Circle'|trans }}</th>
<td>{{ event.circle.name|localize_translatable_string }}</td>
</tr>
</tbody>
</table>
<ul class="record_actions">
<li>
<a href="{{ path('event_edit', { 'id': event.id }) }}" class="sc-button btn-edit">
{{ 'Edit'|trans }}
</a>
</li>
</ul>
<h2>{{ 'Participation'|trans }}</h2>
{% set count = event.participations|length %}
<p>{% transchoice count %}%count% participations to this event{% endtranschoice %}</p>
{% if count > 0 %}
<table>
<thead>
<tr>
<th>{{ 'Person'|trans }}</th>
<th>{{ 'Role'|trans }}</th>
<th>{{ 'Status'|trans }}</th>
<th>{{ 'Last update'|trans }}</th>
<th>&nbsp;</th>
</tr>
</thead>
<tbody>
{% for participation in event.participations %}
<tr>
<td>{{ person_macro.render(participation.person) }}</td>
<td>{{ participation.role.label|localize_translatable_string }}</td>
<td>{{ participation.status.label|localize_translatable_string }}</td>
<td>{{ participation.lastUpdate|localizeddate("long", "none") }}</td>
<td>
<ul class="record_actions">
<li>
<a href="#" class="sc-button btn-edit">
{{ 'Edit'|trans }}
</a>
</li>
</ul>
</td>
</tr>
{% endfor %}
</tbody>
</table>
<ul class="record_actions">
<li><a href="#" class="sc-button btn-edit">{{ 'Edit all the participations'|trans }}</a></li>
</ul>
{% endif %}
{% endblock %}