Final changes
This commit is contained in:
@@ -84,6 +84,6 @@
|
||||
@endforelse
|
||||
</div>
|
||||
|
||||
{{ $items->links() }}
|
||||
{{ $items->links('modcp.pagination') }}
|
||||
|
||||
@endsection
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
{{ $entries->links() }}
|
||||
{{ $entries->links('modcp.pagination') }}
|
||||
@endif
|
||||
|
||||
@endsection
|
||||
|
||||
@@ -47,6 +47,6 @@
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
{{ $entries->links() }}
|
||||
{{ $entries->links( 'modcp.pagination' ) }}
|
||||
@endif
|
||||
@endsection
|
||||
|
||||
@@ -98,6 +98,6 @@
|
||||
@endforelse
|
||||
</div>
|
||||
|
||||
{{ $items->links() }}
|
||||
{{ $items->links('modcp.pagination') }}
|
||||
|
||||
@endsection
|
||||
|
||||
@@ -14,13 +14,15 @@
|
||||
<span class="modcp-stat-label">In queue</span>
|
||||
</div>
|
||||
</a>
|
||||
<a href="{{ route('modcp.locked') }}" class="modcp-stat-card">
|
||||
<div class="modcp-stat-icon"><i data-lucide="lock" size="22"></i></div>
|
||||
<div class="modcp-stat-info">
|
||||
<span class="modcp-stat-value">{{ $stats['locked'] }}</span>
|
||||
<span class="modcp-stat-label">Locked</span>
|
||||
</div>
|
||||
</a>
|
||||
@can('moderate','\App\Models\Entry')
|
||||
<a href="{{ route('modcp.locked') }}" class="modcp-stat-card">
|
||||
<div class="modcp-stat-icon"><i data-lucide="lock" size="22"></i></div>
|
||||
<div class="modcp-stat-info">
|
||||
<span class="modcp-stat-value">{{ $stats['locked'] }}</span>
|
||||
<span class="modcp-stat-label">Locked</span>
|
||||
</div>
|
||||
</a>
|
||||
@endcan
|
||||
@can('is-admin')
|
||||
<a href="{{ route('modcp.draft') }}" class="modcp-stat-card">
|
||||
<div class="modcp-stat-icon"><i data-lucide="scissors" size="22"></i></div>
|
||||
@@ -54,37 +56,39 @@
|
||||
</div>
|
||||
|
||||
@if($recentDeleted->isNotEmpty())
|
||||
<div class="modcp-section-title" style="margin-top: 25px;">Recently deleted</div>
|
||||
<div class="modcp-list">
|
||||
@foreach($recentDeleted as $entry)
|
||||
<div class="modcp-list-item">
|
||||
<div class="modcp-list-item-info">
|
||||
<span class="modcp-list-item-title">{{ $entry->complete_title ?? $entry->title }}</span>
|
||||
<span class="modcp-list-item-meta">
|
||||
<span class="badge {{ $entry->type }}">{{ $entry->type }}</span>
|
||||
Deleted {{ $entry->deleted_at->diffForHumans() }}
|
||||
</span>
|
||||
@can('is-admin')
|
||||
<div class="modcp-section-title" style="margin-top: 25px;">Recently deleted</div>
|
||||
<div class="modcp-list">
|
||||
@foreach($recentDeleted as $entry)
|
||||
<div class="modcp-list-item">
|
||||
<div class="modcp-list-item-info">
|
||||
<span class="modcp-list-item-title">{{ $entry->complete_title ?? $entry->title }}</span>
|
||||
<span class="modcp-list-item-meta">
|
||||
<span class="badge {{ $entry->type }}">{{ $entry->type }}</span>
|
||||
Deleted {{ $entry->deleted_at->diffForHumans() }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="modcp-list-item-actions">
|
||||
<form action="{{ route('modcp.restore', $entry->id) }}" method="POST" style="display:inline">
|
||||
@csrf @method('PATCH')
|
||||
<button type="submit" class="btn success">
|
||||
<i data-lucide="rotate-ccw" size="13"></i> Restore
|
||||
</button>
|
||||
</form>
|
||||
<form action="{{ route('modcp.destroy', $entry->id) }}" method="POST" style="display:inline"
|
||||
onsubmit="return confirm('Permanently delete?')">
|
||||
@csrf @method('DELETE')
|
||||
<button type="submit" class="btn danger">
|
||||
<i data-lucide="trash-2" size="13"></i> Purge
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modcp-list-item-actions">
|
||||
<form action="{{ route('modcp.restore', $entry->id) }}" method="POST" style="display:inline">
|
||||
@csrf @method('PATCH')
|
||||
<button type="submit" class="btn success">
|
||||
<i data-lucide="rotate-ccw" size="13"></i> Restore
|
||||
</button>
|
||||
</form>
|
||||
<form action="{{ route('modcp.destroy', $entry->id) }}" method="POST" style="display:inline"
|
||||
onsubmit="return confirm('Permanently delete?')">
|
||||
@csrf @method('DELETE')
|
||||
<button type="submit" class="btn danger">
|
||||
<i data-lucide="trash-2" size="13"></i> Purge
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
<a href="{{ route('modcp.deleted') }}" class="modcp-list-see-all">
|
||||
See all deleted entries →
|
||||
</a>
|
||||
@endforeach
|
||||
<a href="{{ route('modcp.deleted') }}" class="modcp-list-see-all">
|
||||
See all deleted entries →
|
||||
</a>
|
||||
@endcan
|
||||
</div>
|
||||
@endif
|
||||
|
||||
|
||||
34
resources/views/modcp/pagination.blade.php
Normal file
34
resources/views/modcp/pagination.blade.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php /** @var \Illuminate\Pagination\LengthAwarePaginator $paginator */ ?>
|
||||
@if ($paginator->hasPages())
|
||||
<div class="database-pagination">
|
||||
|
||||
@if ($paginator->onFirstPage())
|
||||
<button class="btn" disabled>«</button>
|
||||
@else
|
||||
<a class="btn" href="{{ $paginator->previousPageUrl() }}">«</a>
|
||||
@endif
|
||||
|
||||
{{-- Pages --}}
|
||||
@foreach ($elements as $element)
|
||||
@if (is_string($element))
|
||||
<button class="btn" disabled>{{ $element }}</button>
|
||||
@endif
|
||||
|
||||
@if (is_array($element))
|
||||
@foreach ($element as $page => $url)
|
||||
<a
|
||||
class="btn {{ $page == $paginator->currentPage() ? 'active' : '' }}"
|
||||
href="{{ $url }}"
|
||||
>{{ $page }}</a>
|
||||
@endforeach
|
||||
@endif
|
||||
@endforeach
|
||||
|
||||
@if ($paginator->hasMorePages())
|
||||
<a class="btn" href="{{ $paginator->nextPageUrl() }}">»</a>
|
||||
@else
|
||||
<button class="btn" disabled>»</button>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
@endif
|
||||
@@ -71,6 +71,6 @@
|
||||
@endforelse
|
||||
</div>
|
||||
|
||||
{{ $items->links() }}
|
||||
{{ $items->links('modcp.pagination') }}
|
||||
|
||||
@endsection
|
||||
|
||||
Reference in New Issue
Block a user