mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-17 15:54:23 +00:00
100 lines
3.9 KiB
Twig
100 lines
3.9 KiB
Twig
{% extends 'ChillEventBundle::layout.html.twig' %}
|
|
|
|
{% block title 'Event : %label%'|trans({ '%label%' : event.name } ) %}
|
|
|
|
{% 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.name }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>{{ 'Date'|trans }}</th>
|
|
<td>{{ event.date|localizeddate('long', 'short') }}</td>
|
|
</tr>
|
|
<tr>
|
|
<th>{{ 'Event type'|trans }}</th>
|
|
<td>{{ event.type.name|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('chill_event__event_edit', { 'event_id': event.id }) }}" class="sc-button bt-edit">
|
|
{{ 'Edit'|trans }}
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
|
|
<h2>{{ 'Participations'|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> </th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for participation in event.participations %}
|
|
<tr>
|
|
<td>{{ person_macro.render(participation.person) }}</td>
|
|
<td>{{ participation.role.name|localize_translatable_string }}</td>
|
|
<td>{{ participation.status.name|localize_translatable_string }}</td>
|
|
<td>{{ participation.lastUpdate|time_diff }} <i class="fa fa-info-circle" title="{{ participation.lastUpdate|localizeddate("long", "medium")|escape('html_attr') }}"></i></td>
|
|
<td>
|
|
<ul class="record_actions">
|
|
{% if is_granted('CHILL_EVENT_PARTICIPATION_UPDATE', participation) %}
|
|
<li>
|
|
<a href="{{ path('chill_event_participation_edit', { 'participation_id' : participation.id } ) }}"
|
|
class="sc-button bt-edit">
|
|
{{ 'Edit'|trans }}
|
|
</a>
|
|
</li>
|
|
{% endif %}
|
|
</ul>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
|
|
|
|
{% endif %}
|
|
|
|
<ul class="record_actions">
|
|
{% if count > 0 %}
|
|
<li><a href="{{ path('chill_event_participation_edit_multiple', { 'event_id' : event.id } ) }}" class="sc-button bt-edit">{{ 'Edit all the participations'|trans }}</a></li>
|
|
{% endif %}
|
|
</ul>
|
|
|
|
<div style="margin-bottom: 1.5em;">
|
|
{{ form_start(form_add_participation_by_person) }}
|
|
{{ form_widget(form_add_participation_by_person.person_id, { 'attr' : { 'style' : 'width: 25em; display:inline-block; ' } } ) }}
|
|
{{ form_widget(form_add_participation_by_person.submit, { 'attr' : { 'class' : 'sc-button bt-create' } } ) }}
|
|
{{ form_rest(form_add_participation_by_person) }}
|
|
{{ form_end(form_add_participation_by_person) }}
|
|
</div>
|
|
|
|
<div class="post_show">
|
|
{{ chill_delegated_block('block_footer_show', { 'event': event }) }}
|
|
</div>
|
|
|
|
{% endblock %}
|