您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

22 行
1.2KB

  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. {% for _locale in app_locales %}
  6. <a class="{{ isIncludedInDropdown|default(false) ? 'dropdown-item' }} {{ action.cssClass }}"
  7. href="{{ action.linkUrl }}&_locale={{ _locale }}"
  8. {% for name, value in action.htmlAttributes %}{{ name }}="{{ value|e('html_attr') }}" {% endfor %}>
  9. {%- if action.icon %}<i class="action-icon {{ action.icon }}"></i> {% endif -%}
  10. {%- if action.label is not empty -%}{{ action.label }} {{ _locale }}{%- endif -%}
  11. </a>
  12. {% endfor %}
  13. {% elseif 'button' == action.htmlElement %}
  14. <button class="{{ action.cssClass }}" {% for name, value in action.htmlAttributes %}{{ name }}="{{ value|e('html_attr') }}" {% endfor %}>
  15. <span class="btn-label">
  16. {%- if action.icon %}<i class="action-icon {{ action.icon }}"></i> {% endif -%}
  17. {%- if action.label is not empty -%}{{ action.label }}{%- endif -%}
  18. </span>
  19. </button>
  20. {% endif %}