{% load i18n %}
{% if is_paginated %}
<div class="mt-2">
  <nav class="d-flex flex-row" role="navigation" aria-label="Pagination">
    <ul class="pagination">
      {% block previous_page %}
        <li class="page-item{% if not page_obj.has_previous %} disabled{% endif %}">

          <a class="page-link"
             {% if page_obj.has_previous %}href="?page={{ page_obj.previous_page_number }}"{% else %}href="#"{% endif %}>
             {% if previous_page_title %}{{ previous_page_title }}{% else %}{% translate "Previous Page"%}{% endif %}
          </a>
        </li>
      {% endblock %}
      {% block next_page %}
        <li class="page-item{% if not page_obj.has_next %} disabled{% endif %}">
          <a class="page-link"
             {% if page_obj.has_next %}href="?page={{ page_obj.next_page_number }}"{% else %}href="#"{% endif %}>
             {% if next_page_title %}{{ next_page_title }}{% else %}{% translate "Next Page"%}{% endif %}
          </a>
        </li>
      {% endblock %}
    </ul>
  </nav>
</div>
{% endif %}
