Blame view

resources/views/catalogs/paginate.blade.php 2.23 KB
881f83e63   Андрей Ларионов   Создание карточки...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
  @if ($paginator->hasPages())
      <div class="pagination">
          <div class="pagination__inner">
          @if ($paginator->onFirstPage())
              <a class="pagination__btn pagination__btn-prev disabled" href="#">
                  <svg width="10" height="17">
                      <use xlink:href="{{ asset('images/sprite.svg#slider-arrow')}}"></use>
                  </svg>
              </a>
          @else
                  <a class="pagination__btn pagination__btn-prev" href="{{ $paginator->previousPageUrl() }}">
                      <svg width="10" height="17">
                          <use xlink:href="{{ asset('images/sprite.svg#slider-arrow')}}"></use>
                      </svg>
                  </a>
          @endif
              <ul class="pagination__list">
                  @foreach ($elements as $element)
                          @if (is_string($element))
  
                              <li class="disabled pagination__item"><span>{{ $element }}</span></li>
  
                          @endif
                          @if (is_array($element))
                              @foreach ($element as $page => $url)
                                  @if ($page == $paginator->currentPage())
  
                                      <li class="pagination__item"><a class="pagination__link active">{{ $page }}</a></li>
  
                                  @else
  
                                      <li class="pagination__item"><a class="pagination__link" href="{{ $url }}">{{ $page }}</a></li>
  
                                  @endif
                              @endforeach
                          @endif
                      @endforeach
  
              </ul>
              @if ($paginator->hasMorePages())
                  <a class="pagination__btn pagination__btn-next" href="{{ $paginator->nextPageUrl() }}">
                      <svg width="10" height="17">
                          <use xlink:href="{{ asset('images/sprite.svg#slider-arrow')}}"></use>
                      </svg></a>
              @else
                  <a class="pagination__btn pagination__btn-next disabled" href="#">
                      <svg width="10" height="17">
                          <use xlink:href="{{ asset('images/sprite.svg#slider-arrow')}}"></use>
                      </svg></a>
              @endif
          </div>
      </div>
  @endif