mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-25 00:53:48 +00:00
implementing the pagination api and the search preview
This commit is contained in:
@@ -6,6 +6,7 @@ services:
|
||||
- "@chill_event.repository.event"
|
||||
- "@chill.main.security.authorization.helper"
|
||||
- "@templating"
|
||||
- "@chill_main.paginator_factory"
|
||||
tags:
|
||||
- { name: chill.search, alias: 'event_regular' }
|
||||
|
||||
|
@@ -2,6 +2,7 @@
|
||||
|
||||
<p>{% transchoice total with { '%pattern%' : pattern } %}%total% events match the search %pattern%{% endtranschoice %}</p>
|
||||
|
||||
<p>{{ 'Results %start%-%end% of %total%'|trans({ '%start%' : start, '%end%': start + events|length, '%total%' : total } ) }}</p>
|
||||
|
||||
{% if events|length > 0 %}
|
||||
<table class="events">
|
||||
@@ -48,5 +49,17 @@
|
||||
<i class="fa fa-plus"></i>
|
||||
{{ '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 %}
|
||||
|
Reference in New Issue
Block a user