{% extends '@Core/admin/crud/index.html.twig' %}

{% block list_item_actions_before %}
    {% if configuration.action(context, 'analytic_stats', true) %}
        {% set analytics = path(
            configuration.pageRoute('analytic_stats'), 
            {entity: item.id}|merge(configuration.pageRouteParams('analytic_stats'))
        ) %}

        <a data-modal="{{ analytics }}" class="btn btn-sm btn-light border border-dark mt-1 mr-1 mb-1">
            <span data-modal="{{ analytics }}" class="fa fa-chart-bar"></span>
        </a>
    {% endif %}
{% endblock %}
