Update (admin): Improve admin post ux
This commit is contained in:
@@ -38,8 +38,20 @@
|
||||
@foreach ($posts as $post)
|
||||
<tr>
|
||||
<td>{{ $post->id }}</td>
|
||||
<td><img width="80" height="60" src="{{ $post->featured_image }}"
|
||||
class="img-fluid rounded-2" alt=""></td>
|
||||
<td>
|
||||
@if (!is_empty($post->featured_image))
|
||||
<img width="80" height="60" src="{{ $post->featured_image }}"
|
||||
class="img-fluid rounded-2" alt="">
|
||||
@else
|
||||
<div style="width:80px; height:50px; background-color: #eeeeee;"
|
||||
class="rounded-3 d-flex justify-content-center">
|
||||
<div class="align-self-center">
|
||||
?
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
</td>
|
||||
|
||||
<td>
|
||||
@if ($post->status === 'publish')
|
||||
<span class="badge bg-success">{{ ucfirst($post->status) }}</span>
|
||||
@@ -62,26 +74,30 @@ class="img-fluid rounded-2" alt=""></td>
|
||||
@else
|
||||
{{ $post->title }}
|
||||
@endif
|
||||
<br>
|
||||
@if ($post->status == 'publish')
|
||||
Published at
|
||||
{{ $post->publish_date->timezone(session()->get('timezone'))->isoFormat('Do MMMM YYYY, h:mm A') }}
|
||||
@endif
|
||||
|
||||
</td>
|
||||
<td>
|
||||
Created at
|
||||
{{ $post->created_at->timezone(session()->get('timezone'))->isoFormat('Do MMMM YYYY, h:mm A') }}<br>
|
||||
Updated {{ $post->updated_at->diffForhumans() }}<br>
|
||||
|
||||
@if ($post->status == 'publish')
|
||||
Published at
|
||||
{{ $post->publish_date->timezone(session()->get('timezone'))->isoFormat('Do MMMM YYYY, h:mm A') }}
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
<div class="d-grid gap-2">
|
||||
<a href="{{ route('posts.manage.indexing', ['post_id' => $post->id]) }}"
|
||||
class="btn">Index to Search Engines</a>
|
||||
<a href="{{ route('posts.manage.edit', ['post_id' => $post->id]) }}"
|
||||
@if ($post->status == 'publish')
|
||||
<a href="{{ route('posts.manage.indexing', ['post_id' => $post->id]) }}"
|
||||
class="btn">Index to Search Engines</a>
|
||||
@endif
|
||||
<a href="{{ route('posts.manage.edit', ['post_id' => $post->id]) }}"
|
||||
class="btn">Edit</a>
|
||||
<a href="{{ route('posts.manage.delete', ['post_id' => $post->id]) }}"
|
||||
class="btn">Delete Forever</a>
|
||||
@if ($post->status == 'trash')
|
||||
<a href="{{ route('posts.manage.delete', ['post_id' => $post->id]) }}"
|
||||
class="btn">Delete Forever</a>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
</td>
|
||||
|
||||
Reference in New Issue
Block a user