mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-21 09:44:23 +00:00
104 lines
4.2 KiB
Twig
104 lines
4.2 KiB
Twig
{#
|
|
* Copyright (C) 2014, Champs Libres Cooperative SCRLFS, <http://www.champs-libres.coop>
|
|
*
|
|
* This program is free software: you can redistribute it and/or modify
|
|
* it under the terms of the GNU Affero General Public License as
|
|
* published by the Free Software Foundation, either version 3 of the
|
|
* License, or (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU Affero General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Affero General Public License
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
#}
|
|
{% extends "ChillPersonBundle::layout.html.twig" %}
|
|
|
|
|
|
{% set activeRouteKey = 'chill_event__list_by_person' %}
|
|
|
|
{% block title %}{{ 'Events participation' |trans }}{% endblock title %}
|
|
|
|
{% block personcontent %}
|
|
<h2>{{ 'Events participation' |trans }}</h2>
|
|
|
|
<table class="events">
|
|
<thead>
|
|
<tr>
|
|
<th class="chill-red">{{ 'Name'|trans }}</th>
|
|
<th class="chill-green">{{ 'Date'|trans }}</th>
|
|
<th class="chill-orange">{{ 'Event type'|trans }}</th>
|
|
{#
|
|
<th class="chill-green">{{ 'Circle'|trans }}</th>
|
|
<th class="chill-green">{{ 'Moderator'|trans }}</th>
|
|
#}
|
|
<th class="chill-red">{{ 'Role'|trans }}</th>
|
|
<th class="chill-green">{{ 'Status'|trans }}</th>
|
|
<th> </th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for participation in participations %}
|
|
<tr>
|
|
<td>
|
|
<a href="{{ path('chill_event__event_show', { 'event_id': participation.event.id }) }}">
|
|
{{ participation.event.name }}
|
|
</a>
|
|
</td>
|
|
<td>{{ participation.event.date|localizeddate('long', 'short') }}</td>
|
|
<td>{{ participation.event.type.name|localize_translatable_string }}</td>
|
|
{#
|
|
<td>{{ participation.event.circle.name|localize_translatable_string }}</td>
|
|
<td>{{ participation.event.moderator|trans|default('-') }}</td>
|
|
#}
|
|
<td>{{ participation.role.name|localize_translatable_string }}</td>
|
|
<td>{{ participation.status.name|localize_translatable_string }}</td>
|
|
<td>
|
|
<ul class="record_actions">
|
|
<li>
|
|
{% if is_granted('CHILL_EVENT_SEE_DETAILS', participation.event) %} #}
|
|
<a href="{{ path('chill_event__event_show', { 'event_id' : participation.event.id } ) }}" class="sc-button black">
|
|
{{ 'See'|trans }}
|
|
</a>
|
|
{% endif %}
|
|
{% if is_granted('CHILL_EVENT_UPDATE', participation.event) %}
|
|
<a href="{{ path('chill_event__event_edit', { 'event_id' : participation.event.id } ) }}" class="sc-button bt-update">
|
|
{{ 'Edit'|trans }}
|
|
</a>
|
|
{% endif %}
|
|
{% if is_granted('CHILL_EVENT_PARTICIPATION_UPDATE', participation) %}
|
|
<a href="{{ path('chill_event_participation_edit', { 'participation_id' : participation.id } ) }}"
|
|
class="sc-button bt-edit">
|
|
{{ 'Edit'|trans }}
|
|
</a>
|
|
{% endif %}
|
|
</li>
|
|
</ul>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
|
|
|
|
{% if participations|length < paginator.getTotalItems %}
|
|
{{ chill_pagination(paginator) }}
|
|
{% endif %}
|
|
|
|
|
|
<pre>
|
|
/!\ dev notes
|
|
=============
|
|
- problème de cohérence avec le bouton voir et avec le bouton modifier
|
|
- checker les autorisations pour les boutons
|
|
- affichage différencié pour les événements passés/présents/futur
|
|
- person menu, utiliser authorizationHelper ou authorizationChecker ??
|
|
</pre>
|
|
|
|
{{ dump() }}
|
|
{#
|
|
#}
|
|
|
|
{% endblock %} |