Skip to content

Commit

Permalink
Fixed issue bagisto#9568
Browse files Browse the repository at this point in the history
  • Loading branch information
shivendra-webkul committed Mar 6, 2024
1 parent 9b7041d commit 628ce16
Show file tree
Hide file tree
Showing 5 changed files with 71 additions and 43 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@ class="max-w-[128px] max-h-[146px] min-w-[128px] w-[128px] h-[146px] rounded-xl"
</div>
</a>
@endforeach
<!-- Pagination -->
{{ $reviews->links() }}
</div>
@else
<!-- Review Empty Page -->
Expand Down
107 changes: 66 additions & 41 deletions packages/Webkul/Shop/src/Resources/views/partials/pagination.blade.php
Original file line number Diff line number Diff line change
@@ -1,50 +1,75 @@
@if ($paginator->hasPages())
<div class="pagination shop mt-50">
<!-- Previous Page Link -->
@if ($paginator->onFirstPage())
<a class="page-item previous">
<i class="icon angle-left-icon"></i>
</a>
@else
<a data-page="{{ urldecode($paginator->previousPageUrl()) }}" href="{{ urldecode($paginator->previousPageUrl()) }}" id="previous" class="page-item previous">
<i class="icon angle-left-icon"></i>
</a>
@endif
<div class="flex justify-between items-center p-6">
<p class="text-xs font-medium"> Showing {{ $paginator->firstItem() }} to {{ $paginator->lastItem() }} of {{ $paginator->total() }} entries </p>

<!-- Pagination Elements -->
@foreach ($elements as $element)
<!-- "Three Dots" Separator -->
@if (is_string($element))
<a class="page-item disabled" aria-disabled="true">
{{ $element }}
</a>
@endif

<!-- Array Of Links -->
@if (is_array($element))
@foreach ($element as $page => $url)
@if ($page == $paginator->currentPage())
<a class="page-item active">
{{ $page }}
</a>
<nav aria-label="Page Navigation">
<ul class="inline-flex items-center -space-x-px">
<!-- Previous Page Link -->
<li>
@if ($paginator->onFirstPage())
<span class="icon-arrow-left rtl:icon-arrow-right text-2xl flex items-center justify-center w-[35px] h-[37px] border border-[#E9E9E9] ltr:rounded-l-lg rtl:rounded-r-lg leading-normal font-medium"></span>
@else
<a class="page-item as" href="{{ urldecode($url) }}">
{{ $page }}
<a
href="{{ urldecode($paginator->previousPageUrl()) }}"
class="flex items-center justify-center w-[35px] h-[37px] border border-[#E9E9E9] ltr:rounded-l-lg rtl:rounded-r-lg leading-normal font-medium hover:bg-gray-100"
aria-label="Previous Page"
>
<span class="icon-arrow-left rtl:icon-arrow-right text-2xl"></span>
</a>
@endif
</li>


<!-- Pagination Elements -->
@foreach ($elements as $element)
@if (is_string($element))
<li>
<span
class="flex items-center justify-center w-[35px] h-[37px] border border-[#E9E9E9] leading-normal font-medium text-center text-black disabled"
>
{{ $element }}
</span>
</li>
@endif

@if (is_array($element))
@foreach ($element as $page => $url)
<li>
@if ($page == $paginator->currentPage())
<a
href="#"
class="flex items-center justify-center w-[35px] h-[37px] border border-[#E9E9E9] leading-normal font-medium text-center text-black bg-gray-100 hover:bg-gray-100"
>
{{ $page }}
</a>
@else
<a
href="{{ $url }}"
class="flex items-center justify-center w-[35px] h-[37px] border border-[#E9E9E9] leading-normal font-medium text-center text-black hover:bg-gray-100"
>
{{ $page }}
</a>
@endif
</li>
@endforeach
@endif
@endforeach
@endif
@endforeach

<!-- Next Page Link -->
@if ($paginator->hasMorePages())
<a href="{{ urldecode($paginator->nextPageUrl()) }}" data-page="{{ urldecode($paginator->nextPageUrl()) }}" id="next" class="page-item next">
<i class="icon angle-right-icon"></i>
</a>
@else
<a class="page-item next">
<i class="icon angle-right-icon"></i>
</a>
@endif
<!-- Next Page Link -->
<li>
@if ($paginator->hasMorePages())
<a
href="{{ urldecode($paginator->nextPageUrl()) }}"
class="flex items-center justify-center w-[35px] h-[37px] border border-[#E9E9E9] rtl:rounded-l-lg ltr:rounded-r-lg leading-normal font-medium hover:bg-gray-100"
aria-label="Next Page"
>
<span class="icon-arrow-right rtl:icon-arrow-left text-2xl"></span>
</a>
@else
<span class="icon-arrow-right rtl:icon-arrow-left text-2xl flex items-center justify-center w-[35px] h-[37px] border border-[#E9E9E9] rtl:rounded-l-lg ltr:rounded-r-lg leading-normal font-medium"></span>
@endif
</li>
</ul>
</nav>
</div>
@endif
1 change: 0 additions & 1 deletion public/themes/shop/default/build/assets/app-1663ec7f.css

This file was deleted.

1 change: 1 addition & 0 deletions public/themes/shop/default/build/assets/app-e961432d.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/themes/shop/default/build/manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"src/Resources/assets/css/app.css": {
"file": "assets/app-1663ec7f.css",
"file": "assets/app-e961432d.css",
"isEntry": true,
"src": "src/Resources/assets/css/app.css"
},
Expand Down

0 comments on commit 628ce16

Please sign in to comment.