{% set is_bottom_pagination = is_bottom_pagination|default(false) %}

{% if entityArray is defined %}
  <div class="d-flex justify-content-between">
    <form
        class="form-inline multi-form-entity-table pagination-widget{% if is_bottom_pagination %} pagi-bot{% else %} pagi-top{% endif %}">
      {% if not is_bottom_pagination %}
        <input type="hidden" name="quickFilter" value="{{ app.request.query.get('quickFilter') }}">
        <input type="hidden" name="items" value="{{ app.request.query.get('items') }}">
      {% endif %}
      {% if entityArray.foot.hasPrevPage %}
        <a class="btn"
           href="{{ aa_admin_querystring_merge({page: entityArray.foot.minPage}) }}"
        >
          <i class="fa fa-chevron-left"></i><i class="fa fa-chevron-left"></i>
        </a>
        <a class="btn"
           href="{{ aa_admin_querystring_merge({page: entityArray.foot.currentPage - 1}) }}"
        >
          <i class="fa fa-chevron-left"></i>
        </a>
      {% endif %}
      <div class="input-group">
        <input
            name="page{{ is_bottom_pagination ? '_bis' : '' }}"
            type="number"
            min="{{ entityArray.foot.minPage }}"
            max="{{ entityArray.foot.maxPage }}"
            class="form-control list-page-input"
            value="{{ entityArray.foot.currentPage }}"
        />
        <div class="input-group-append">
          <span class="input-group-text">/ {{ entityArray.foot.maxPage }}</span>
        </div>
      </div>
      {% if entityArray.foot.hasNextPage %}
        <a class="btn"
           href="{{ aa_admin_querystring_merge({page: entityArray.foot.currentPage + 1}) }}"
        >
          <i class="fa fa-chevron-right"></i>
        </a>
        <a class="btn"
           href="{{ aa_admin_querystring_merge({page: entityArray.foot.maxPage}) }}"
        >
          <i class="fa fa-chevron-right"></i><i class="fa fa-chevron-right"></i>
        </a>
      {% endif %}
    </form>
  </div>
{% endif %}