Commit bc1b001a authored by Thomas Löffler's avatar Thomas Löffler
Browse files

Correct pagination for events

parent 5eeabdfa
Pipeline #8238 passed with stages
in 3 minutes and 32 seconds
...@@ -110,9 +110,9 @@ routeEnhancers: ...@@ -110,9 +110,9 @@ routeEnhancers:
plugin: Pievent plugin: Pievent
routes: routes:
- { routePath: '/', _controller: 'Event::list' } - { routePath: '/', _controller: 'Event::list' }
- { routePath: '/{page}', _controller: 'Event::list', _arguments: {'page': '@widget_0/currentPage'} } - { routePath: '/page/{page}', _controller: 'Event::list', _arguments: {'page': '@widget_0/currentPage'}, _requirements: {'page': \d+} }
- { routePath: '/{event_category}/all', _controller: 'Event::list', _arguments: {'event_category': 'overwriteDemand/category'} } - { routePath: '/{event_category}/all', _controller: 'Event::list', _arguments: {'event_category': 'overwriteDemand/category'} }
- { routePath: '/{event_category}/all/{page}', _controller: 'Event::list', _arguments: {'event_category': 'overwriteDemand/category', 'page': '@widget_0/currentPage'} } - { routePath: '/{event_category}/all/page/{page}', _controller: 'Event::list', _arguments: {'event_category': 'overwriteDemand/category', 'page': '@widget_0/currentPage'}, _requirements: {'page': \d+} }
- { routePath: '/{event_title}', _controller: 'Event::detail', _arguments: {'event_title': 'event'} } - { routePath: '/{event_title}', _controller: 'Event::detail', _arguments: {'event_title': 'event'} }
- { routePath: '/{event_title}/ical', _controller: 'Event::icalDownload', _arguments: {'event_title': 'event'} } - { routePath: '/{event_title}/ical', _controller: 'Event::icalDownload', _arguments: {'event_title': 'event'} }
defaultController: 'Event::list' defaultController: 'Event::list'
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
<div class="row"> <div class="row">
<div class="{f:if(condition:'{categories -> f:count()} > 1',then:'col-md-8',else:'col-md-12')}"> <div class="{f:if(condition:'{categories -> f:count()} > 1',then:'col-md-8',else:'col-md-12')}">
<div id="accordion" role="tablist" aria-multiselectable="true"> <div id="accordion" role="tablist" aria-multiselectable="true">
<f:widget.paginate objects="{events}" as="paginatedEvents" configuration="{itemsPerPage: 10, insertAbove: 0, insertBelow: 1, maximumNumberOfLinks: 10}"> <f:widget.paginate objects="{events}" as="paginatedEvents" configuration="{itemsPerPage: 10, insertAbove: 0, insertBelow: 1, maximumNumberOfLinks: 10, addQueryStringMethod: 'GET'}">
<f:for each="{paginatedEvents}" as="event"> <f:for each="{paginatedEvents}" as="event">
<f:render partial="Event/ListItem" arguments="{_all}" /> <f:render partial="Event/ListItem" arguments="{_all}" />
</f:for> </f:for>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment