mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-18 08:14:24 +00:00
66 lines
2.4 KiB
Twig
66 lines
2.4 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 %}
|
|
|
|
<p>{{ 'Results %start%-%end% of %total%'|trans({ '%start%' : start, '%end%': start + events|length, '%total%' : total } ) }}</p>
|
|
|
|
<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> </th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for event in events %}
|
|
<tr>
|
|
<td>{{ event.name }}</td>
|
|
<td>{{ event.date|localizeddate('long', 'short') }}</td>
|
|
<td>{{ event.type.name|localize_translatable_string }}</td>
|
|
<td>
|
|
<ul class="record_actions">
|
|
<li>
|
|
{# {% if is_granted('CHILL_EVENT_SEE_DETAILS', event) %} #}
|
|
<a href="{{ path('chill_event__event_show', { 'event_id' : event.id } ) }}" class="sc-button black">
|
|
{{ 'See'|trans }}
|
|
</a>
|
|
{# {% endif %} #}
|
|
{% if is_granted('CHILL_EVENT_UPDATE', event) %}
|
|
<a href="{{ path('chill_event__event_edit', { 'event_id' : event.id } ) }}" class="sc-button bt-update">
|
|
{{ 'Edit'|trans }}
|
|
</a>
|
|
{% endif %}
|
|
</li>
|
|
</ul>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
|
|
{% endif %}
|
|
|
|
<ul class="record_actions">
|
|
<li>
|
|
<a href="{{ path('chill_event__event_new') }}" class="sc-button bt-create" >
|
|
{{ 'New event'|trans }}
|
|
</a>
|
|
</li>
|
|
{% if preview == true and events|length < total %}
|
|
<li>
|
|
<a href="{{ path('chill_main_search', { "name": search_name, "q" : pattern }) }}" class="sc-button btn-next">
|
|
{{ 'See all results'|trans }}
|
|
</a>
|
|
</li>
|
|
{% endif %}
|
|
|
|
</ul>
|
|
|
|
{% if preview == false %}
|
|
{{ chill_pagination(paginator) }}
|
|
{% endif %}
|