dashboard__action_create.html.twig 898 B

12345678910111213141516171819
  1. {% if admin.subClasses is empty %}
  2. <a class="btn btn-link btn-flat" href="{{ action.url }}">
  3. <i class="fa fa-{{ action.icon }}" aria-hidden="true"></i>
  4. {{ action.label|trans({}, action.translation_domain|default('SonataAdminBundle')) }}
  5. </a>
  6. {% else %}
  7. <a class="btn btn-link btn-flat dropdown-toggle" data-toggle="dropdown" href="#">
  8. <i class="fa fa-{{ action.icon }}" aria-hidden="true"></i>
  9. {{ action.label|trans({}, action.translation_domain|default('SonataAdminBundle')) }}
  10. <span class="caret"></span>
  11. </a>
  12. <ul class="dropdown-menu">
  13. {% for subclass in admin.subclasses|keys %}
  14. <li>
  15. <a href="{{ admin.generateUrl('create', {'subclass': subclass}) }}">{{ subclass|trans({}, action.translation_domain|default('SonataAdminBundle')) }}</a>
  16. </li>
  17. {% endfor %}
  18. </ul>
  19. {% endif %}