Pagination on status page, previous and next week
This commit is contained in:
@@ -35,6 +35,8 @@ return [
|
||||
'setup' => 'Setup Cachet',
|
||||
'no_incidents' => 'No incidents reported.',
|
||||
'past_incidents' => 'Past incidents',
|
||||
'previous_week' => 'Previous week',
|
||||
'next_week' => 'Next week',
|
||||
// Dashboard
|
||||
'dashboard' => [
|
||||
'dashboard' => 'Dashboard',
|
||||
|
||||
@@ -29,4 +29,20 @@
|
||||
@foreach($allIncidents as $incidents)
|
||||
@include('partials.incidents', $incidents)
|
||||
@endforeach
|
||||
<hr/>
|
||||
|
||||
<nav>
|
||||
<ul class="pager">
|
||||
<li class="previous">
|
||||
<a href="{{ route('status-page') }}?start_date={{ $previousDate }}">
|
||||
<span aria-hidden="true">←</span> {{ trans('cachet.previous_week') }}
|
||||
</a>
|
||||
</li>
|
||||
<li class="next @if( ! $canPageForward) disabled @endif">
|
||||
<a @if($canPageForward) href="{{ route('status-page') }}?start_date={{ $nextDate }}" @endif>
|
||||
{{ trans('cachet.next_week') }} <span aria-hidden="true">→</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
@stop
|
||||
|
||||
Reference in New Issue
Block a user