Update (admin): Improve admin post ux
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
const Ziggy = {"url":"https:\/\/productalert.co","port":null,"defaults":{},"routes":{"debugbar.openhandler":{"uri":"_debugbar\/open","methods":["GET","HEAD"]},"debugbar.clockwork":{"uri":"_debugbar\/clockwork\/{id}","methods":["GET","HEAD"]},"debugbar.assets.css":{"uri":"_debugbar\/assets\/stylesheets","methods":["GET","HEAD"]},"debugbar.assets.js":{"uri":"_debugbar\/assets\/javascript","methods":["GET","HEAD"]},"debugbar.cache.delete":{"uri":"_debugbar\/cache\/{key}\/{tags?}","methods":["DELETE"]},"sanctum.csrf-cookie":{"uri":"sanctum\/csrf-cookie","methods":["GET","HEAD"]},"ignition.healthCheck":{"uri":"_ignition\/health-check","methods":["GET","HEAD"]},"ignition.executeSolution":{"uri":"_ignition\/execute-solution","methods":["POST"]},"ignition.updateConfig":{"uri":"_ignition\/update-config","methods":["POST"]},"api.auth.login.post":{"uri":"api\/login","methods":["POST"]},"api.auth.logout.post":{"uri":"api\/logout","methods":["POST"]},"api.admin.post.get":{"uri":"api\/admin\/post\/{id}","methods":["GET","HEAD"]},"api.admin.country-locales":{"uri":"api\/admin\/country-locales","methods":["GET","HEAD"]},"api.admin.categories":{"uri":"api\/admin\/categories\/{country_locale_slug}","methods":["GET","HEAD"]},"api.admin.authors":{"uri":"api\/admin\/authors","methods":["GET","HEAD"]},"api.admin.upload.cloud.image":{"uri":"api\/admin\/image\/upload","methods":["POST"]},"api.admin.post.upsert":{"uri":"api\/admin\/admin\/post\/upsert","methods":["POST"]},"feeds.main":{"uri":"posts.rss","methods":["GET","HEAD"]},"login":{"uri":"login","methods":["GET","HEAD"]},"logout":{"uri":"logout","methods":["POST"]},"register":{"uri":"register","methods":["GET","HEAD"]},"password.request":{"uri":"password\/reset","methods":["GET","HEAD"]},"password.email":{"uri":"password\/email","methods":["POST"]},"password.reset":{"uri":"password\/reset\/{token}","methods":["GET","HEAD"]},"password.update":{"uri":"password\/reset","methods":["POST"]},"password.confirm":{"uri":"password\/confirm","methods":["GET","HEAD"]},"dashboard":{"uri":"admin","methods":["GET","HEAD"]},"about":{"uri":"admin\/about","methods":["GET","HEAD"]},"users.index":{"uri":"admin\/users","methods":["GET","HEAD"]},"posts.manage":{"uri":"admin\/posts","methods":["GET","HEAD"]},"posts.manage.edit":{"uri":"admin\/posts\/edit\/{post_id}","methods":["GET","HEAD"]},"posts.manage.indexing":{"uri":"admin\/posts\/indexing\/{post_id}","methods":["GET","HEAD"]},"posts.manage.new":{"uri":"admin\/posts\/new","methods":["GET","HEAD"]},"profile.show":{"uri":"admin\/profile","methods":["GET","HEAD"]},"profile.update":{"uri":"admin\/profile","methods":["PUT"]},"home":{"uri":"\/","methods":["GET","HEAD"]},"home.country":{"uri":"{country}","methods":["GET","HEAD"]},"home.country.posts":{"uri":"{country}\/posts","methods":["GET","HEAD"]},"home.country.post":{"uri":"{country}\/posts\/{post_slug}","methods":["GET","HEAD"]},"home.country.category":{"uri":"{country}\/{category}","methods":["GET","HEAD"]}}};
|
||||
const Ziggy = {"url":"https:\/\/productalert.co","port":null,"defaults":{},"routes":{"debugbar.openhandler":{"uri":"_debugbar\/open","methods":["GET","HEAD"]},"debugbar.clockwork":{"uri":"_debugbar\/clockwork\/{id}","methods":["GET","HEAD"]},"debugbar.assets.css":{"uri":"_debugbar\/assets\/stylesheets","methods":["GET","HEAD"]},"debugbar.assets.js":{"uri":"_debugbar\/assets\/javascript","methods":["GET","HEAD"]},"debugbar.cache.delete":{"uri":"_debugbar\/cache\/{key}\/{tags?}","methods":["DELETE"]},"sanctum.csrf-cookie":{"uri":"sanctum\/csrf-cookie","methods":["GET","HEAD"]},"ignition.healthCheck":{"uri":"_ignition\/health-check","methods":["GET","HEAD"]},"ignition.executeSolution":{"uri":"_ignition\/execute-solution","methods":["POST"]},"ignition.updateConfig":{"uri":"_ignition\/update-config","methods":["POST"]},"api.auth.login.post":{"uri":"api\/login","methods":["POST"]},"api.auth.logout.post":{"uri":"api\/logout","methods":["POST"]},"api.admin.post.get":{"uri":"api\/admin\/post\/{id}","methods":["GET","HEAD"]},"api.admin.country-locales":{"uri":"api\/admin\/country-locales","methods":["GET","HEAD"]},"api.admin.categories":{"uri":"api\/admin\/categories\/{country_locale_slug}","methods":["GET","HEAD"]},"api.admin.authors":{"uri":"api\/admin\/authors","methods":["GET","HEAD"]},"api.admin.upload.cloud.image":{"uri":"api\/admin\/image\/upload","methods":["POST"]},"api.admin.post.upsert":{"uri":"api\/admin\/admin\/post\/upsert","methods":["POST"]},"feeds.main":{"uri":"posts.rss","methods":["GET","HEAD"]},"login":{"uri":"login","methods":["GET","HEAD"]},"logout":{"uri":"logout","methods":["POST"]},"register":{"uri":"register","methods":["GET","HEAD"]},"password.request":{"uri":"password\/reset","methods":["GET","HEAD"]},"password.email":{"uri":"password\/email","methods":["POST"]},"password.reset":{"uri":"password\/reset\/{token}","methods":["GET","HEAD"]},"password.update":{"uri":"password\/reset","methods":["POST"]},"password.confirm":{"uri":"password\/confirm","methods":["GET","HEAD"]},"dashboard":{"uri":"admin","methods":["GET","HEAD"]},"about":{"uri":"admin\/about","methods":["GET","HEAD"]},"users.index":{"uri":"admin\/users","methods":["GET","HEAD"]},"posts.manage":{"uri":"admin\/posts","methods":["GET","HEAD"]},"posts.manage.edit":{"uri":"admin\/posts\/edit\/{post_id}","methods":["GET","HEAD"]},"posts.manage.delete":{"uri":"admin\/posts\/delete\/{post_id}","methods":["GET","HEAD"]},"posts.manage.indexing":{"uri":"admin\/posts\/indexing\/{post_id}","methods":["GET","HEAD"]},"posts.manage.new":{"uri":"admin\/posts\/new","methods":["GET","HEAD"]},"profile.show":{"uri":"admin\/profile","methods":["GET","HEAD"]},"profile.update":{"uri":"admin\/profile","methods":["PUT"]},"home":{"uri":"\/","methods":["GET","HEAD"]},"home.country":{"uri":"{country}","methods":["GET","HEAD"]},"home.country.posts":{"uri":"{country}\/posts","methods":["GET","HEAD"]},"home.country.post":{"uri":"{country}\/posts\/{post_slug}","methods":["GET","HEAD"]},"home.country.category":{"uri":"{country}\/{category}","methods":["GET","HEAD"]}}};
|
||||
|
||||
if (typeof window !== 'undefined' && typeof window.Ziggy !== 'undefined') {
|
||||
Object.assign(Ziggy.routes, window.Ziggy.routes);
|
||||
|
||||
@@ -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