Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions app/Entity/Book.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@
new Create(),
new Update(),
new Index(grid: BookGrid::class),
new Index(
template: '@SyliusAdminUi/crud/index.html.twig',
shortName: 'withoutGrid',
),
new Delete(),
new BulkDelete(),
new Show(),
Expand Down
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
"phpstan/phpstan": "^1.10",
"phpstan/phpstan-symfony": "^1.3",
"phpunit/phpunit": "^9.6",
"slevomat/coding-standard": "<8.23",
"sylius-labs/coding-standard": "^4.0",
"symfony/browser-kit": "^6.4 || ^7.0",
"symfony/console": "^6.4 || ^7.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
{% import '@SyliusBootstrapAdminUi/shared/helper/pagination.html.twig' as pagination %}

{% set resources = hookable_metadata.context.resources %}
{% set data = resources.data %}
{% set definition = resources.definition %}
{% set data = resources.data|default([]) %}
{% set definition = resources.definition|default(null) %}

{% if data|length > 0 %}
<div class="card">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
{% set path = path(app.request.attributes.get('_route'), app.request.attributes.all('_route_params')) %}
{% set are_criteria_set = app.request.query.has('criteria') %}

{% if resources.definition.enabledFilters is not empty %}
{% if resources.definition.enabledFilters|default([]) is not empty %}
<div class="position-relative z-1 bg-white mb-5">
{% set content %}
<div class="mb-3">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% set resources = hookable_metadata.context.resources %}

{% if resources.data|length == 0 %}
{% if resources.data is defined and resources.data|length == 0 %}
<div class="card">
<div class="empty">
{% hook 'no_results' %}
Expand Down
Loading