Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.6] Add first and last pagination links #23138

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions src/Illuminate/Pagination/resources/views/bootstrap-4.blade.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
@if ($paginator->hasPages())
<ul class="pagination">
{{-- First Page Link --}}
@if ($paginator->onFirstPage())
<li class="page-item disabled"><span class="page-link">&laquo;</span></li>
@else
<li class="page-item"><a class="page-link" href="{{ $paginator->url(1) }}" rel="first">&laquo;</a></li>
@endif

{{-- Previous Page Link --}}
@if ($paginator->onFirstPage())
<li class="page-item disabled"><span class="page-link">&lsaquo;</span></li>
Expand Down Expand Up @@ -32,5 +39,12 @@
@else
<li class="page-item disabled"><span class="page-link">&rsaquo;</span></li>
@endif

{{-- Last Page Link --}}
@if ($paginator->hasMorePages())
<li class="page-item"><a class="page-link" href="{{ $paginator->url($paginator->lastPage()) }}" rel="last">&raquo;</a></li>
@else
<li class="page-item disabled"><span class="page-link">&raquo;</span></li>
@endif
</ul>
@endif
14 changes: 14 additions & 0 deletions src/Illuminate/Pagination/resources/views/default.blade.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
@if ($paginator->hasPages())
<ul class="pagination">
{{-- First Page Link --}}
@if ($paginator->onFirstPage())
<li class="disabled"><span>&laquo;</span></li>
@else
<li><a href="{{ $paginator->url(1) }}" rel="first">&laquo;</a></li>
@endif

{{-- Previous Page Link --}}
@if ($paginator->onFirstPage())
<li class="disabled"><span>&lsaquo;</span></li>
Expand Down Expand Up @@ -32,5 +39,12 @@
@else
<li class="disabled"><span>&rsaquo;</span></li>
@endif

{{-- Last Page Link --}}
@if ($paginator->hasMorePages())
<li><a href="{{ $paginator->url($paginator->lastPage()) }}" rel="last">&raquo;</a></li>
@else
<li class="disabled"><span>&raquo;</span></li>
@endif
</ul>
@endif
22 changes: 18 additions & 4 deletions src/Illuminate/Pagination/resources/views/semantic-ui.blade.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
@if ($paginator->hasPages())
<div class="ui pagination menu">
{{-- First Page Link --}}
@if ($paginator->onFirstPage())
<a class="icon item disabled"> <i class="left double angle icon"></i> </a>
@else
<a class="icon item" href="{{ $paginator->url(1) }}" rel="first"> <i class="left double angle icon"></i> </a>
@endif

{{-- Previous Page Link --}}
@if ($paginator->onFirstPage())
<a class="icon item disabled"> <i class="left chevron icon"></i> </a>
<a class="icon item disabled"> <i class="left angle icon"></i> </a>
@else
<a class="icon item" href="{{ $paginator->previousPageUrl() }}" rel="prev"> <i class="left chevron icon"></i> </a>
<a class="icon item" href="{{ $paginator->previousPageUrl() }}" rel="prev"> <i class="left angle icon"></i> </a>
@endif

{{-- Pagination Elements --}}
Expand All @@ -28,9 +35,16 @@

{{-- Next Page Link --}}
@if ($paginator->hasMorePages())
<a class="icon item" href="{{ $paginator->nextPageUrl() }}" rel="next"> <i class="right chevron icon"></i> </a>
<a class="icon item" href="{{ $paginator->nextPageUrl() }}" rel="next"> <i class="right angle icon"></i> </a>
@else
<a class="icon item disabled"> <i class="right angle icon"></i> </a>
@endif

{{-- Last Page Link --}}
@if ($paginator->hasMorePages())
<a class="icon item" href="{{ $paginator->url($paginator->lastPage()) }}" rel="last"> <i class="right double angle icon"></i> </a>
@else
<a class="icon item disabled"> <i class="right chevron icon"></i> </a>
<a class="icon item disabled"> <i class="right double angle icon"></i> </a>
@endif
</div>
@endif