-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Based on #31 ![image](https://github.com/user-attachments/assets/ae0f9e86-fa46-463c-85b5-e027cb2272a0)
- Loading branch information
Showing
7 changed files
with
52 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
src/BootstrapAdminUi/templates/shared/crud/index/content/grid/no_results.html.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{% set resources = hookable_metadata.context.resources %} | ||
|
||
{% if resources.data|length == 0 %} | ||
<div class="card"> | ||
<div class="empty"> | ||
{% hook 'no_results' %} | ||
</div> | ||
</div> | ||
{% endif %} |
10 changes: 10 additions & 0 deletions
10
src/BootstrapAdminUi/templates/shared/crud/index/content/grid/no_results/action.html.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{% from '@SyliusBootstrapAdminUi/shared/helper/icon.html.twig' import icon %} | ||
|
||
{% if _context.route is defined and (_context.hidden is not defined or _context.hidden == false) %} | ||
<div class="empty-action"> | ||
<a href="{{ path(_context.route) }}" class="btn btn-primary"> | ||
{{ icon({ icon: _context.icon|default('plus') }) }} | ||
{{ _context.translation_key|default('sylius.ui.add_new_entry')|trans }} | ||
</a> | ||
</div> | ||
{% endif %} |
5 changes: 5 additions & 0 deletions
5
src/BootstrapAdminUi/templates/shared/crud/index/content/grid/no_results/image.html.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{% if _context.hidden is not defined or _context.hidden == false %} | ||
<div class="empty-img"> | ||
<img src="{{ asset(_context.image|default('bundles/syliusbootstrapadminui/images/no_data.svg')) }}" height="128" alt=""> | ||
</div> | ||
{% endif %} |
5 changes: 5 additions & 0 deletions
5
src/BootstrapAdminUi/templates/shared/crud/index/content/grid/no_results/subtitle.html.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{% if _context.hidden is not defined or _context.hidden == false %} | ||
<p class="empty-subtitle text-secondary"> | ||
{{ _context.translation_key|default('sylius.ui.no_results_adjust_your_search')|trans }} | ||
</p> | ||
{% endif %} |
3 changes: 3 additions & 0 deletions
3
src/BootstrapAdminUi/templates/shared/crud/index/content/grid/no_results/title.html.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{% if _context.hidden is not defined or _context.hidden == false %} | ||
<p class="empty-title">{{ _context.translation_key|default('sylius.ui.no_results')|trans }}</p> | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters