Cleanup pagination CSS and UI

This commit is contained in:
Dane Everitt 2017-11-10 21:41:39 -06:00
parent b07052548c
commit 4dfc7a0053
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
7 changed files with 11 additions and 75 deletions

View file

@ -105,7 +105,7 @@ class NodeRepository extends EloquentRepository implements NodeRepositoryInterfa
$instance->setRelation( $instance->setRelation(
'allocations', 'allocations',
$instance->allocations()->orderBy('ip', 'asc')->orderBy('port', 'asc') $instance->allocations()->orderBy('ip', 'asc')->orderBy('port', 'asc')
->with('server')->paginate(50) ->with('server')->paginate(2)
); );
return $instance; return $instance;

View file

@ -420,3 +420,7 @@ label.control-label > span.field-optional:before {
content: "optional"; content: "optional";
color: #bbbbbb; color: #bbbbbb;
} }
.pagination > li > a, .pagination > li > span {
padding: 3px 10px !important;
}

View file

@ -72,9 +72,11 @@
@endforeach @endforeach
</table> </table>
</div> </div>
<div class="box-footer text-center"> @if($node->allocations->hasPages())
{{ $node->allocations->render() }} <div class="box-footer text-center">
</div> {{ $node->allocations->render() }}
</div>
@endif
</div> </div>
</div> </div>
<div class="col-sm-4"> <div class="col-sm-4">

View file

@ -1,36 +0,0 @@
@if ($paginator->count() > 1)
<ul class="pagination">
<!-- Previous 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->previousPageUrl() }}" rel="prev">&laquo;</a></li>
@endif
<!-- Pagination Elements -->
@foreach ($elements as $element)
<!-- "Three Dots" Separator -->
@if (is_string($element))
<li class="page-item disabled"><span class="page-link">{{ $element }}</span></li>
@endif
<!-- Array Of Links -->
@if (is_array($element))
@foreach ($element as $page => $url)
@if ($page == $paginator->currentPage())
<li class="page-item active"><span class="page-link">{{ $page }}</span></li>
@else
<li class="page-item"><a class="page-link" href="{{ $url }}">{{ $page }}</a></li>
@endif
@endforeach
@endif
@endforeach
<!-- Next Page Link -->
@if ($paginator->hasMorePages())
<li class="page-item"><a class="page-link" href="{{ $paginator->nextPageUrl() }}" rel="next">&raquo;</a></li>
@else
<li class="page-item disabled"><span class="page-link">&raquo;</span></li>
@endif
</ul>
@endif

View file

@ -1,5 +1,5 @@
@if ($paginator->lastPage() > 1) @if ($paginator->lastPage() > 1)
<ul class="pagination"> <ul class="pagination pull-right no-margin">
<!-- Previous Page Link --> <!-- Previous Page Link -->
@if ($paginator->onFirstPage()) @if ($paginator->onFirstPage())
{{-- <li class="disabled"><span>&laquo;</span></li> --}} {{-- <li class="disabled"><span>&laquo;</span></li> --}}

View file

@ -1,17 +0,0 @@
@if ($paginator->count() > 1)
<ul class="pagination">
<!-- Previous 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->previousPageUrl() }}" rel="prev">&laquo;</a></li>
@endif
<!-- Next Page Link -->
@if ($paginator->hasMorePages())
<li class="page-item"><a class="page-link" href="{{ $paginator->nextPageUrl() }}" rel="next">&raquo;</a></li>
@else
<li class="page-item disabled"><span class="page-link">&raquo;</span></li>
@endif
</ul>
@endif

View file

@ -1,17 +0,0 @@
@if ($paginator->count() > 1)
<ul class="pagination">
<!-- Previous Page Link -->
@if ($paginator->onFirstPage())
<li class="disabled"><span>&laquo;</span></li>
@else
<li><a href="{{ $paginator->previousPageUrl() }}" rel="prev">&laquo;</a></li>
@endif
<!-- Next Page Link -->
@if ($paginator->hasMorePages())
<li><a href="{{ $paginator->nextPageUrl() }}" rel="next">&raquo;</a></li>
@else
<li class="disabled"><span>&raquo;</span></li>
@endif
</ul>
@endif