File tree Expand file tree Collapse file tree 2 files changed +15
-10
lines changed
src/BootstrapAdminUi/templates/shared/helper Expand file tree Collapse file tree 2 files changed +15
-10
lines changed Original file line number Diff line number Diff line change @@ -44,6 +44,7 @@ public function buildGrid(GridBuilderInterface $gridBuilder): void
4444 {
4545 $ gridBuilder
4646 ->addOrderBy ('startsAt ' )
47+ ->setLimits ([10 , 25 , 50 ])
4748 ->addFilter (
4849 EntityFilter::create ('conference ' , Conference::class)
4950 ->setLabel ('app.ui.conference ' )
Original file line number Diff line number Diff line change 1111{% endmacro %}
1212
1313{% macro number_of_results_selector(paginator , pagination_limits ) %}
14- <div class =" dropdown" >
15- <button type =" button" class =" btn dropdown-toggle" data-bs-toggle =" dropdown" >
16- {{ ' sylius.ui.show' | trans }} {{ paginator .maxPerPage }}
17- </button >
18- <div class =" dropdown-menu dropdown-menu-end " >
19- {% for limit in pagination_limits | filter(limit => limit != paginator .maxPerPage ) %}
20- {% set path = path(app .request .attributes .get (' _route' ), app .request .attributes .all (' _route_params' )| merge (app .request .query )| merge ({' limit' : limit })) %}
21- <a class =" dropdown-item" href =" {{ path }}" >{{ limit }}</a >
22- {% endfor %}
14+ {% set other_pagination_limits = pagination_limits | filter(limit => limit != paginator .maxPerPage ) %}
15+
16+ {% if other_pagination_limits is not empty %}
17+ <div class =" dropdown" >
18+ <button type =" button" class =" btn dropdown-toggle" data-bs-toggle =" dropdown" >
19+ {{ ' sylius.ui.show' | trans }} {{ paginator .maxPerPage }}
20+ </button >
21+ <div class =" dropdown-menu dropdown-menu-end " >
22+ {% for limit in other_pagination_limits %}
23+ {% set path = path(app .request .attributes .get (' _route' ), app .request .attributes .all (' _route_params' )| merge (app .request .query )| merge ({' limit' : limit })) %}
24+ <a class =" dropdown-item" href =" {{ path }}" >{{ limit }}</a >
25+ {% endfor %}
26+ </div >
2327 </div >
24- </ div >
28+ {% endif %}
2529{% endmacro %}
You can’t perform that action at this time.
0 commit comments