mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-30 19:43:49 +00:00
- adapt event templates - event bundle: fix deprecated deps injections - fix error with n=0 not iterated into querybuilder with centers loop
71 lines
2.4 KiB
Twig
71 lines
2.4 KiB
Twig
<h2>{{ 'Event search'|trans }}</h2>
|
|
|
|
<p>{% transchoice total with { '%pattern%' : pattern } %}%total% events match the search %pattern%{% endtranschoice %}</p>
|
|
|
|
<style>
|
|
table.events td:last-child {
|
|
width: 15em;
|
|
}
|
|
</style>
|
|
{% if events|length > 0 %}
|
|
|
|
<p>{{ 'Results %start%-%end% of %total%'|trans({ '%start%' : start, '%end%': start + events|length, '%total%' : total } ) }}</p>
|
|
<table class="table table-bordered border-dark align-middle 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|format_date('long') }}</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="btn btn-view">
|
|
{{ 'See'|trans }}
|
|
</a>
|
|
{# {% endif %} #}
|
|
{% if is_granted('CHILL_EVENT_UPDATE', event) %}
|
|
<a href="{{ path('chill_event__event_edit', { 'event_id' : event.id } ) }}" class="btn btn-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_pickcenter') }}" class="btn btn-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="btn btn-misc">
|
|
{{ 'See all results'|trans }}
|
|
</a>
|
|
</li>
|
|
{% endif %}
|
|
|
|
</ul>
|
|
|
|
{% if preview == false %}
|
|
{{ chill_pagination(paginator) }}
|
|
{% endif %}
|
|
|