{#

This file is part of the Sonata package.

(c) Thomas Rabaix <thomas.rabaix@sonata-project.org>

For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.

#}
{% extends base_template %}

{% block title %}{{ 'title_select_subclass'|trans({}, 'SonataAdminBundle') }}{% endblock %}

{% block content %}
    <div class="box box-success">
        <div class="box-header">
            <h3 class="box-title">
                {{ block('title') }}
            </h3>
        </div>
        <div class="box-body">
            {% for subclass in admin.subclasses|keys %}
                <div class="col-lg-2 col-md-3 col-sm-4 col-xs-6">
                    <a href="{{ admin.generateUrl(action, {'subclass': subclass }) }}"
                       class="btn btn-app btn-block"
                            >
                        <i class="fas fa-plus-square" aria-hidden="true"></i>
                        {{ subclass|trans({}, admin.translationdomain|default('SonataAdminBundle')) }}
                    </a>
                </div>
            {% else %}
                <span class="alert alert-info">{{ 'no_subclass_available'|trans({}, 'SonataAdminBundle') }}</span>
            {% endfor %}
            <div class="clearfix"></div>
        </div>
    </div>
{% endblock %}
