[feature] allow to edit multiple participations at once

ref #7
This commit is contained in:
2016-04-12 22:40:11 +02:00
parent c1b9069138
commit 78c53fe7b0
6 changed files with 220 additions and 3 deletions

View File

@@ -0,0 +1,60 @@
{% extends 'ChillEventBundle::layout.html.twig' %}
{% import 'ChillPersonBundle:Person:macro.html.twig' as person_macro %}
{% block event_content -%}
<h1>{{ 'Participation Edit'|trans }}</h1>
<table>
<tbody>
<tr>
<th>{{ 'Associated event'|trans }} </th>
<td>{{ event.name }}</td>
</tr>
<tr>
<th>{{ 'Date'|trans }} </th>
<td>{{ event.date|localizeddate('long', 'none') }}</td>
</tr>
</tbody>
</table>
<h2>{{ 'Participations'|trans }}</h2>
{{ form_start(form) }}
<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 form.participations %}
<tr>
<td>{{ person_macro.render(participation.vars.value.person) }}</td>
<td>{{ form_widget(participation.role) }}</td>
<td>{{ form_widget(participation.status) }}</td>
<td>{{ participation.vars.value.lastUpdate|time_diff }} <i class="fa fa-info-circle" title="{{ participation.vars.value.lastUpdate|localizeddate("long", "medium")|escape('html_attr') }}"></i></td>
</tr>
{% endfor %}
</tbody>
</table>
<ul class="record_actions">
<li>
<a href="{{ path('chill_event__event_show', { 'event_id' : event.id } ) }}" class="sc-button bt-cancel">
<i class="fa fa-arrow-left"></i>
{{ 'Back to the event'|trans }}
</a>
</li>
<li>
{{ form_widget(form.submit, { 'attr' : { 'class' : 'sc-button bt-edit' } } ) }}
</li>
</ul>
{{ form_end(form) }}
{% endblock %}