12345678910111213141516171819 |
- {% if admin.subClasses is empty %}
- <a class="btn btn-link btn-flat" href="{{ action.url }}">
- <i class="fa fa-{{ action.icon }}" aria-hidden="true"></i>
- {{ action.label|trans({}, action.translation_domain|default('SonataAdminBundle')) }}
- </a>
- {% else %}
- <a class="btn btn-link btn-flat dropdown-toggle" data-toggle="dropdown" href="#">
- <i class="fa fa-{{ action.icon }}" aria-hidden="true"></i>
- {{ action.label|trans({}, action.translation_domain|default('SonataAdminBundle')) }}
- <span class="caret"></span>
- </a>
- <ul class="dropdown-menu">
- {% for subclass in admin.subclasses|keys %}
- <li>
- <a href="{{ admin.generateUrl('create', {'subclass': subclass}) }}">{{ subclass|trans({}, action.translation_domain|default('SonataAdminBundle')) }}</a>
- </li>
- {% endfor %}
- </ul>
- {% endif %}
|