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

43 lines
1.7 KiB
Twig

<h2>{{ 'Event search'|trans }}</h2>
<p>{% transchoice total with { '%pattern%' : pattern } %}%total% events match the search %pattern%{% endtranschoice %}</p>
{% if events|length > 0 %}
<table>
<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>&nbsp;</th>
</tr>
</thead>
<tbody>
{% for event in events %}
<tr>
<td>{{ event.label }}</td>
<td>{{ event.date|localizeddate('long', 'none') }}</td>
<td>{{ event.type.label|localize_translatable_string }}</td>
<td>
<ul class="record_actions">
<li>
{# {% if is_granted('CHILL_EVENT_SEE_DETAILS', event) %} #}
<a href="{{ path('event_show', { 'event_id' : event.id } ) }}" class="sc-button btn-action">
{{ 'See'|trans }}
</a>
{# {% endif %} #}
{% if is_granted('CHILL_EVENT_UPDATE', event) %}
<a href="#" class="sc-button btn-edit">
{{ 'Edit'|trans }}
</a>
{% endif %}
</li>
</ul>
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}