vendor/easycorp/easyadmin-bundle/src/Resources/views/crud/action.html.twig line 1

Open in your IDE?
  1. {# @var ea \EasyCorp\Bundle\EasyAdminBundle\Context\AdminContext #}
  2. {# @var action \EasyCorp\Bundle\EasyAdminBundle\Dto\ActionDto #}
  3. {# @var entity \EasyCorp\Bundle\EasyAdminBundle\Dto\EntityDto #}
  4. {% if 'a' == action.htmlElement %}
  5. <a class="{{ isIncludedInDropdown|default(false) ? 'dropdown-item' }} {{ action.cssClass }}"
  6. href="{{ action.linkUrl }}"
  7. {% for name, value in action.htmlAttributes %}{{ name }}="{{ value|e('html_attr') }}" {% endfor %}>
  8. {%- if action.icon %}<i class="action-icon {{ action.icon }}"></i> {% endif -%}
  9. {%- if action.label is not empty -%}{{ action.label }}{%- endif -%}
  10. </a>
  11. {% elseif 'button' == action.htmlElement %}
  12. <button class="{{ action.cssClass }}" {% for name, value in action.htmlAttributes %}{{ name }}="{{ value|e('html_attr') }}" {% endfor %}>
  13. <span class="btn-label">
  14. {%- if action.icon %}<i class="action-icon {{ action.icon }}"></i> {% endif -%}
  15. {%- if action.label is not empty -%}{{ action.label }}{%- endif -%}
  16. </span>
  17. </button>
  18. {% endif %}