Procházet zdrojové kódy

Fix error admin

develop
Fab před 3 roky
rodič
revize
0b200e7b7f
2 změnil soubory, kde provedl 2 přidání a 1 odebrání
  1. +1
    -0
      Resources/views/crud/field/gallery.html.twig
  2. +1
    -1
      Resources/views/crud/field/image.html.twig

+ 1
- 0
Resources/views/crud/field/gallery.html.twig Zobrazit soubor

{# @var field \EasyCorp\Bundle\EasyAdminBundle\Dto\FieldDto #} {# @var field \EasyCorp\Bundle\EasyAdminBundle\Dto\FieldDto #}
{# @var entity \EasyCorp\Bundle\EasyAdminBundle\Dto\EntityDto #} {# @var entity \EasyCorp\Bundle\EasyAdminBundle\Dto\EntityDto #}
{# this is a bit ugly, but Twig doesn't have a 'is numeric' test #} {# this is a bit ugly, but Twig doesn't have a 'is numeric' test #}

{% if field.formattedValue matches '/^\\d+$/' %} {% if field.formattedValue matches '/^\\d+$/' %}
<span class="badge badge-secondary">{{ field.formattedValue }}</span> <span class="badge badge-secondary">{{ field.formattedValue }}</span>
{% else %} {% else %}

+ 1
- 1
Resources/views/crud/field/image.html.twig Zobrazit soubor

{# @var field \EasyCorp\Bundle\EasyAdminBundle\Dto\FieldDto #} {# @var field \EasyCorp\Bundle\EasyAdminBundle\Dto\FieldDto #}
{# @var entity \EasyCorp\Bundle\EasyAdminBundle\Dto\EntityDto #} {# @var entity \EasyCorp\Bundle\EasyAdminBundle\Dto\EntityDto #}
{% set html_id = 'ea-lightbox-' ~ field.uniqueId %} {% set html_id = 'ea-lightbox-' ~ field.uniqueId %}
{% if field.value is not null %}
{% if field.value is not null and field.value.path is not null %}
<a href="#" class="ea-lightbox-thumbnail" title="{{ field.value.legend }}" data-featherlight="#{{ html_id }}" data-featherlight-close-on-click="anywhere"> <a href="#" class="ea-lightbox-thumbnail" title="{{ field.value.legend }}" data-featherlight="#{{ html_id }}" data-featherlight-close-on-click="anywhere">
<img src="{{ asset(field.value.path) }}" class="img-fluid"> <img src="{{ asset(field.value.path) }}" class="img-fluid">
</a> </a>

Načítá se…
Zrušit
Uložit