{% if pageCount > 1 %}
    <!-- PAGINATOR -->
    {#<div class="col-md-12 paginator">#}
        {#<div class="col-md-4 col-xs-12 text-paginator">#}
            {#<div class="">{{ 'pagination.show'|trans({ '%first%': firstItemNumber, '%last%': lastItemNumber, '%total%': totalCount }) }}</div>#}
        {#</div>#}
    {#</div>#}
    <nav aria-label="...">
        <ul class="pagination justify-content-end">
            {% if previous is defined %}
                <li class="page-item">
                    <a class="page-link" href="{{ path(route, query|merge({(pageParameterName): previous})) }}"
                       data-page="{{ previous }}">
                        <i class="fa fa-angle-left"></i>
                    </a>
                </li>
            {% else %}
                <li class="page-item disabled">
                    <a class="page-link" href="javascript:void(0)">
                        <i class="fa fa-angle-left"></i>
                    </a>
                </li>
            {% endif %}

            {% if startPage > 1 %}
                <li class="page-item">
                    <a class="page-link" href="{{ path(route, query|merge({(pageParameterName): 1})) }}">1</a>
                </li>
                {% if startPage == 3 %}
                    <li class="page-item">
                        <a class="page-link" href="{{ path(route, query|merge({(pageParameterName): 2})) }}">2</a>
                    </li>
                {% elseif startPage != 2 %}
                    <li class="page-item disabled">
                        <span class="page-link" >&hellip;</span>
                    </li>
                {% endif %}
            {% endif %}

            {% for page in pagesInRange %}
                {% if page != current %}
                    <li class="page-item">
                        <a class="page-link" href="{{ path(route, query|merge({(pageParameterName): page})) }}">{{ page }}</a>
                    </li>
                {% else %}
                    <li class="page-item active">
                        <span class="page-link" >{{ page }}</span>
                    </li>
                {% endif %}

            {% endfor %}

            {% if pageCount > endPage %}
                {% if pageCount > (endPage + 1) %}
                    {% if pageCount > (endPage + 2) %}
                        <li class="page-item disabled">
                            <span class="page-link"  >&hellip;</span>
                        </li>
                    {% else %}
                        <li class="page-item">
                            <a class="page-link" href="{{ path(route, query|merge({(pageParameterName): (pageCount - 1)})) }}">{{ pageCount -1 }}</a>
                        </li>
                    {% endif %}
                {% endif %}
                <li class="page-item">
                    <a class="page-link" href="{{ path(route, query|merge({(pageParameterName): pageCount})) }}">{{ pageCount }}</a>
                </li>
            {% endif %}

            {% if next is defined %}
                <li class="page-item">
                    <a class="page-link" href="{{ path(route, query|merge({(pageParameterName): next})) }}" data-page="{{ next }}">
                        <i class="fa fa-angle-right"></i>
                    </a>
                </li>
            {% else %}
                <li class="page-item disabled">
                    <a class="page-link" href="javascript:void(0)">
                        <i class="fa fa-angle-right"></i>
                    </a>
                </li>
            {% endif %}
        </ul>
    </nav>
    <!-- END PAGINATOR -->
{% endif %}
