<div class="card mb-2">
    <div class="card-header">
        <i class="fa fa-flag"></i> <span class='h4 ml-2'>{{ 'Rubriques'|trans }}</span>
    </div>
    <div class="card-body">
        <div class="card-text">
            <p style="text-align:justify;">
                {% for rubrique in getAllRubriques() %}
                    {% if rubrique.prestataires|length > 0 %}
                        <p class='text-truncate'>
                            <a class='rubrique' href='{{ path('show_rubrique', {'slug': rubrique.slug}) }}' data-toggle="tooltip" data-placement="bottom" title="{{rubrique.name}}">
                                {% if rubrique.media is not null %}
                                    {% thumbnail rubrique.media, 'preview' with {'style': 'width: 30px; max-width: 30px'} %}
                                    {{rubrique.name}}
                                {% else %}
                                    <span style='margin-left:25px;'>{{rubrique.name}}</span>
                                {% endif %}
                            </a>
                            <span class="badge badge-primary badge-pill" data-toggle="tooltip" data-placement="bottom" title="{{rubrique.prestataires|length}}  {{ 'prestataires'|trans }}">{{rubrique.prestataires|length}}</span>
                        </p>
                    {% endif %}
                {% endfor %}
            </p>
        </div>
    </div>
</div>