templates/bundles/EasyAdminBundle/crud/action.html.twig line 1
{# @var ea \EasyCorp\Bundle\EasyAdminBundle\Context\AdminContext #}
{# @var action \EasyCorp\Bundle\EasyAdminBundle\Dto\ActionDto #}
{# @var entity \EasyCorp\Bundle\EasyAdminBundle\Dto\EntityDto #}
{% if 'a' == action.htmlElement %}
<a class="{{ isIncludedInDropdown|default(false) ? 'dropdown-item' }} {{ action.cssClass }}"
href="{{ action.linkUrl }}"
{% for name, value in action.htmlAttributes %}{{ name }}="{{ (value.trans is defined ? value|trans : value)|e('html_attr') }}" {% endfor %}>
{%- if action.icon %}<i class="action-icon {{ action.icon }}"></i>
{% else %}
{% if action.name == "new" %}<i class="fas fa-plus"></i> {% endif %}
{% if action.name == "edit" %}<i class="fa-solid fa-pen-to-square"></i> {% endif %}
{% if action.name == "batchDelete" %}<i class="fa-solid fa-trash-can"></i> {% endif %}
{% if action.name == "delete" %}<i class="fa-solid fa-trash-can"></i> {% endif %}
{% endif -%}
{%- if action.label is not empty -%}<span class="action-label">{{ action.label|trans|raw }}</span>{%- endif -%}
</a>
{% elseif 'button' == action.htmlElement %}
<button class="{{ action.cssClass }}" {% for name, value in action.htmlAttributes %}{{ name }}="{{ (value.trans is defined ? value|trans : value)|e('html_attr') }}" {% endfor %}>
<span class="btn-label">
{%- if action.icon %}<i class="action-icon {{ action.icon }}"></i>
{% else %}
{% if action.name == "saveAndReturn" %}<i class="fa-solid fa-floppy-disk"></i> {% endif %}
{% if action.name == "saveAndAddAnother" %}<i class="fa-solid fa-floppy-disk"></i> {% endif %}
{% if action.name == "delete" %}<i class="fa-solid fa-trash-can"></i> {% endif %}
{% endif -%}
{%- if action.label is not empty -%}<span class="action-label">{{ action.label|trans|raw }}</span>{%- endif -%}
</span>
</button>
{% endif %}