File tree Expand file tree Collapse file tree 5 files changed +9
-4
lines changed
src/BootstrapAdminUi/templates/shared/crud/index/content/grid Expand file tree Collapse file tree 5 files changed +9
-4
lines changed Original file line number Diff line number Diff line change 36
36
new Create (),
37
37
new Update (),
38
38
new Index (grid: BookGrid::class),
39
+ new Index (
40
+ template: '@SyliusAdminUi/crud/index.html.twig ' ,
41
+ shortName: 'withoutGrid ' ,
42
+ ),
39
43
new Delete (),
40
44
new BulkDelete (),
41
45
new Show (),
Original file line number Diff line number Diff line change 49
49
"phpstan/phpstan" : " ^1.10" ,
50
50
"phpstan/phpstan-symfony" : " ^1.3" ,
51
51
"phpunit/phpunit" : " ^9.6" ,
52
+ "slevomat/coding-standard" : " <8.23" ,
52
53
"sylius-labs/coding-standard" : " ^4.0" ,
53
54
"symfony/browser-kit" : " ^6.4 || ^7.0" ,
54
55
"symfony/console" : " ^6.4 || ^7.0" ,
Original file line number Diff line number Diff line change 2
2
{% import ' @SyliusBootstrapAdminUi/shared/helper/pagination.html.twig' as pagination %}
3
3
4
4
{% set resources = hookable_metadata .context .resources %}
5
- {% set data = resources .data %}
6
- {% set definition = resources .definition %}
5
+ {% set data = resources .data | default ([]) %}
6
+ {% set definition = resources .definition | default ( null ) %}
7
7
8
8
{% if data | length > 0 %}
9
9
<div class =" card" >
Original file line number Diff line number Diff line change 6
6
{% set path = path(app .request .attributes .get (' _route' ), app .request .attributes .all (' _route_params' )) %}
7
7
{% set are_criteria_set = app .request .query .has (' criteria' ) %}
8
8
9
- {% if resources .definition .enabledFilters is not empty %}
9
+ {% if resources .definition .enabledFilters | default ([]) is not empty %}
10
10
<div class =" position-relative z-1 bg-white mb-5" >
11
11
{% set content %}
12
12
<div class =" mb-3" >
Original file line number Diff line number Diff line change 1
1
{% set resources = hookable_metadata .context .resources %}
2
2
3
- {% if resources .data | length == 0 %}
3
+ {% if resources .data is defined and resources . data | length == 0 %}
4
4
<div class =" card" >
5
5
<div class =" empty" >
6
6
{% hook ' no_results' %}
You can’t perform that action at this time.
0 commit comments