Update (admin): Improve admin post ux
This commit is contained in:
@@ -1,33 +1,33 @@
|
||||
@if ($message = Session::get('success'))
|
||||
<div class="alert alert-success alert-block my-3">
|
||||
<h4 class="alert-title">Success!</h4>
|
||||
<div class="text-muted">{{ $message }}</div>
|
||||
</div>
|
||||
<div class="alert alert-success alert-block my-3">
|
||||
<h4 class="alert-title">Success!</h4>
|
||||
<div class="text-muted">{{ $message }}</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
|
||||
@if ($message = Session::get('error'))
|
||||
<div class="alert alert-danger alert-block my-3">
|
||||
<div class="alert alert-danger alert-block my-3">
|
||||
|
||||
<h4 class="alert-title">Error!</h4>
|
||||
<div class="text-muted">{{ $message }}</div>
|
||||
</div>
|
||||
<h4 class="alert-title">Error!</h4>
|
||||
<div class="text-muted">{{ $message }}</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
|
||||
@if ($message = Session::get('warning'))
|
||||
<div class="alert alert-warning alert-block my-3">
|
||||
<div class="alert alert-warning alert-block my-3">
|
||||
|
||||
<h4 class="alert-title">Warning!</h4>
|
||||
<div class="text-muted">{{ $message }}</div>
|
||||
</div>
|
||||
<h4 class="alert-title">Warning!</h4>
|
||||
<div class="text-muted">{{ $message }}</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
|
||||
@if ($message = Session::get('info'))
|
||||
<div class="alert alert-info alert-block my-3">
|
||||
<div class="alert alert-info alert-block my-3">
|
||||
|
||||
<h4 class="alert-title">Attention!</h4>
|
||||
<div class="text-muted">{{ $message }}</div>
|
||||
</div>
|
||||
@endif
|
||||
<h4 class="alert-title">Attention!</h4>
|
||||
<div class="text-muted">{{ $message }}</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@@ -1,24 +1,26 @@
|
||||
<div class="card mb-3 border-3 border-primary">
|
||||
<div class="card-body">
|
||||
<h3 class="">Webmaster Announcement</h3>
|
||||
<div class="text-muted">
|
||||
<p class="fw-bold mb-0">Change Log 2/8/2023 12.03am</p>
|
||||
<ul>
|
||||
<li>(Feature) Add Delete Forever button</li>
|
||||
<li>(Feature) Add Index to Search Engines button</li>
|
||||
<li>(Feature) Auto set author on new post</li>
|
||||
<li>(Feature) Only publish status must fill in all post fields, others status can save with minimum title and
|
||||
slug only</li>
|
||||
<li>(Fix) Post list has timezone error</li>
|
||||
</ul>
|
||||
<p class="fw-bold mb-0">Change Log 1/8/2023 10.35pm</p>
|
||||
<ul>
|
||||
<li>(Feature) Auto set category on new post</li>
|
||||
<li>(Feature) Auto set author on new post</li>
|
||||
<li>(Feature) Only publish status must fill in all post fields, others status can save with minimum title and
|
||||
slug only</li>
|
||||
<li>(Fix) Post list has timezone error</li>
|
||||
</ul>
|
||||
<div class="card-body">
|
||||
<h3 class="">Webmaster Announcement</h3>
|
||||
<div class="text-muted">
|
||||
<p class="fw-bold mb-0">Change Log 2/8/2023 12.03am</p>
|
||||
<ul>
|
||||
<li>(Feature) Add Delete Forever button</li>
|
||||
<li>(Feature) Add Index to Search Engines button</li>
|
||||
<li>(Feature) Auto set author on new post</li>
|
||||
<li>(Feature) Only publish status must fill in all post fields, others status can save with minimum
|
||||
title and
|
||||
slug only</li>
|
||||
<li>(Fix) Post list has timezone error</li>
|
||||
</ul>
|
||||
<p class="fw-bold mb-0">Change Log 1/8/2023 10.35pm</p>
|
||||
<ul>
|
||||
<li>(Feature) Auto set category on new post</li>
|
||||
<li>(Feature) Auto set author on new post</li>
|
||||
<li>(Feature) Only publish status must fill in all post fields, others status can save with minimum
|
||||
title and
|
||||
slug only</li>
|
||||
<li>(Fix) Post list has timezone error</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -32,8 +32,8 @@
|
||||
|
||||
<div class="container-xl">
|
||||
|
||||
@include('admin.partials.flash_messages')
|
||||
</div>
|
||||
@include('admin.partials.flash_messages')
|
||||
</div>
|
||||
|
||||
@yield('content')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user