Skip to content

Commit

Permalink
Fixed pagination bug
Browse files Browse the repository at this point in the history
Code required
@if ($models->getTotal() > 10)

NOT

@if (count($models) > 10)
  • Loading branch information
snipe committed Nov 16, 2013
1 parent 24c3a15 commit cf59ec8
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 15 deletions.
7 changes: 4 additions & 3 deletions app/views/backend/assets/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@
</div>
</h3>
</div>
@if (count($assets) > 10)
{{ $assets->links() }}

@if ($assets->getTotal() > 10)
{{ $assets->links() }}
@endif
<table class="table table-bordered table-striped table-hover">
<thead>
Expand Down Expand Up @@ -52,7 +53,7 @@
</tbody>
</table>

@if (count($assets) > 10)
@if ($assets->getTotal() > 10)
{{ $assets->links() }}
@endif
@stop
4 changes: 2 additions & 2 deletions app/views/backend/categories/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</div>
</h3>
</div>
@if (count($categories) > 10)
@if ($categories->getTotal() > 10)
{{ $categories->links() }}
@endif
<table class="table table-bordered table-striped table-hover">
Expand Down Expand Up @@ -49,7 +49,7 @@
</tbody>
</table>

@if (count($categories) > 10)
@if ($categories->getTotal() > 10)
{{ $categories->links() }}
@endif
@stop
4 changes: 2 additions & 2 deletions app/views/backend/depreciations/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
</h3>
</div>

@if (count($depreciations) > 10)
@if ($depreciations->getTotal() > 10)
{{ $depreciations->links() }}
@endif

Expand All @@ -44,7 +44,7 @@
</tbody>
</table>

@if (count($depreciations) > 10)
@if ($depreciations->getTotal() > 10)
{{ $depreciations->links() }}
@endif

Expand Down
4 changes: 2 additions & 2 deletions app/views/backend/licenses/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</div>
</h3>
</div>
@if (count($licenses) > 50)
@if ($licenses->getTotal() > 10)
{{ $licenses->links() }}
@endif
<table class="table table-bordered table-striped table-hover">
Expand Down Expand Up @@ -49,7 +49,7 @@
</tbody>
</table>

@if (count($licenses) > 50)
@if ($licenses->getTotal() > 10)
{{ $licenses->links() }}
@endif
@stop
4 changes: 2 additions & 2 deletions app/views/backend/locations/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
</h3>
</div>

@if (count($locations) > 10)
@if ($locations->getTotal() > 10)
{{ $locations->links() }}
@endif

Expand Down Expand Up @@ -46,7 +46,7 @@
</tbody>
</table>

@if (count($locations) > 10)
@if ($locations->getTotal() > 10)
{{ $locations->links() }}
@endif

Expand Down
4 changes: 2 additions & 2 deletions app/views/backend/manufacturers/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
</h3>
</div>

@if (count($manufacturers) > 10)
@if ($manufacturers->getTotal() > 10)
{{ $manufacturers->links() }}
@endif

Expand All @@ -44,7 +44,7 @@
</tbody>
</table>

@if (count($manufacturers) > 10)
@if ($manufacturers->getTotal() > 10)
{{ $manufacturers->links() }}
@endif

Expand Down
4 changes: 2 additions & 2 deletions app/views/backend/models/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</div>
</h3>
</div>
@if (count($models) > 10)
@if ($models->getTotal() > 10)
{{ $models->links() }}
@endif
<table class="table table-bordered table-striped table-hover">
Expand All @@ -44,7 +44,7 @@
</tbody>
</table>

@if (count($models) > 10)
@if ($models->getTotal() > 10)
{{ $models->links() }}
@endif

Expand Down

0 comments on commit cf59ec8

Please sign in to comment.