templates/_partials/pagination.html.twig line 1

Open in your IDE?
  1.     {% if paginationVariables is defined %}
  2.     <div class="flex items-center justify-between border-t border-gray-200 bg-white px-4 py-3 sm:px-6">
  3.         <div class="flex flex-1 justify-between sm:hidden">
  4.             {% if paginationVariables.previous is defined %}
  5.             <a href="{{ pimcore_url({'page': paginationVariables.previous}) }}" class="relative inline-flex items-center py-2 px-4 bg-gray-50 hover:bg-gray-100 text-sm font-medium text-gray-700 border border-gray-300 rounded-md">{{ 'Previous' | trans }}</a>
  6.             {% else %}
  7.                 <div></div>
  8.             {% endif %}
  9.             {% if paginationVariables.next is defined %}
  10.             <a href="{{ pimcore_url({'page': paginationVariables.next}) }}" class="ml-3 relative inline-flex items-center py-2 px-4 bg-gray-50 hover:bg-gray-100 text-sm font-medium text-gray-700 border border-gray-300 rounded-md">{{ 'Next' | trans }}</a>
  11.             {% endif %}
  12.         </div>
  13.         <div class="hidden sm:flex sm:flex-1 sm:items-center sm:justify-between">
  14.             <div>
  15.                 <p class="text-sm text-gray-700">
  16.                     {{ ('pagination.showing')|trans }}
  17.                     <span class="font-medium">{{ paginationVariables.firstItemNumber }}</span>
  18.                     {{ ('pagination.to')|trans }}
  19.                     <span class="font-medium">{{ paginationVariables.lastItemNumber }}</span>
  20.                     {{ ('pagination.of')|trans }}
  21.                     <span class="font-medium">{{ paginationVariables.totalCount }}</span>
  22.                     {{ ('pagination.results')|trans }}
  23.                 </p>
  24.             </div>
  25.             <div>
  26.                 <nav class="isolate inline-flex -space-x-px rounded-md" aria-label="Pagination">
  27.                     {% if paginationVariables.previous is defined %}
  28.                         <a href="{{ pimcore_url({'page': paginationVariables.previous}) }}" class="relative inline-flex items-center py-2 px-2 hover:bg-gray-100 text-sm font-medium text-gray-500 rounded-md focus:z-20">
  29.                             <span class="sr-only">{{ ('pagination.previous')|lower|trans }}</span>
  30.                             <!-- Heroicon name: mini/chevron-left -->
  31.                             <svg class="h-5 w-5" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
  32.                                 <path fill-rule="evenodd" d="M12.79 5.23a.75.75 0 01-.02 1.06L8.832 10l3.938 3.71a.75.75 0 11-1.04 1.08l-4.5-4.25a.75.75 0 010-1.08l4.5-4.25a.75.75 0 011.06.02z" clip-rule="evenodd" />
  33.                             </svg>
  34.                         </a>
  35.                     {% endif %}
  36.                     {% for page in paginationVariables.pagesInRange %}
  37.                         {% if paginationVariables.current == page %}
  38.                             <a href="#" class="relative z-10 inline-flex items-center py-2 px-4 bg-brand-50 text-sm font-medium text-brand-600 border border-brand-500 rounded-md focus:z-20">{{ page }}</a>
  39.                         {% else %}
  40.                             <a href="{{ pimcore_url({'page': page}) }}" class="relative inline-flex items-center py-2 px-4 hover:bg-gray-50 text-sm font-medium text-gray-500 rounded-md focus:z-20">
  41.                                 {{ page }}
  42.                             </a>
  43.                         {% endif %}
  44.                     {% endfor %}
  45.                     {% if paginationVariables.next is defined %}
  46.                         <a href="{{ pimcore_url({'page': paginationVariables.next}) }}" class="relative inline-flex items-center py-2 px-2 hover:bg-gray-100 text-sm font-medium text-gray-500 rounded-md focus:z-20">
  47.                             <span class="sr-only">{{ 'Next' | trans }}</span>
  48.                             <!-- Heroicon name: mini/chevron-right -->
  49.                             <svg class="h-5 w-5" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
  50.                                 <path fill-rule="evenodd" d="M7.21 14.77a.75.75 0 01.02-1.06L11.168 10 7.23 6.29a.75.75 0 111.04-1.08l4.5 4.25a.75.75 0 010 1.08l-4.5 4.25a.75.75 0 01-1.06-.02z" clip-rule="evenodd" />
  51.                             </svg>
  52.                         </a>
  53.                     {% endif %}
  54.                 </nav>
  55.             </div>
  56.         </div>
  57.     </div>
  58. {% endif %}