Manage posts on dashboard and templates fixes
This commit is contained in:
@@ -10,16 +10,16 @@
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
||||
d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"/>
|
||||
</svg>
|
||||
Posts management
|
||||
<span>Posts management ({{ posts_count }})</span>
|
||||
</h2>
|
||||
<p class="text-sm text-gray-600 mt-1">View and manage all published posts.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="posts-list" class="py-6 space-y-6">
|
||||
<div id="posts-list" class="space-y-6">
|
||||
{% block posts %}
|
||||
{% if posts.is_empty() %}
|
||||
<div class="bg-gray-50 rounded-lg p-8 border-2 border-dashed border-gray-300 text-center">
|
||||
<div class="p-8 text-center">
|
||||
<div class="w-16 h-16 bg-gray-200 rounded-full flex items-center justify-center mx-auto mb-4">
|
||||
<svg class="w-8 h-8 text-gray-500"
|
||||
fill="none"
|
||||
@@ -29,8 +29,8 @@
|
||||
d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"/>
|
||||
</svg>
|
||||
</div>
|
||||
<h3 class="text-lg font-medium text-gray-900 mb-2">No posts yet</h3>
|
||||
<p class="text-gray-600">Published posts will appear here.</p>
|
||||
<h3 class="text-lg font-medium text-gray-900 mb-2">No data to display</h3>
|
||||
<p class="text-gray-600">The request did not return any data.</p>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="divide-y divide-gray-200">
|
||||
@@ -39,7 +39,7 @@
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="flex items-center justify-center space-x-2">
|
||||
<div class="flex items-center justify-center space-x-2 mb-6">
|
||||
<button hx-get="/admin/posts?page={{ posts_current_page - 1 }}"
|
||||
hx-target="#posts-list"
|
||||
hx-swap="innerHTML"
|
||||
|
||||
@@ -13,16 +13,16 @@
|
||||
<path d="M23 21v-2a4 4 0 0 0-3-3.87"/>
|
||||
<path d="M16 3.13a4 4 0 0 1 0 7.75"/>
|
||||
</svg>
|
||||
Subscribers management
|
||||
Subscribers management ({{ count }})
|
||||
</h2>
|
||||
<p class="text-sm text-gray-600 mt-1">View and manage your subscribers.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="subscribers-list" class="py-6 space-y-6">
|
||||
<div id="subscribers-list" class="space-y-6">
|
||||
{% block subs %}
|
||||
{% if subscribers.is_empty() %}
|
||||
<div class="bg-gray-50 rounded-lg p-8 border-2 border-dashed border-gray-300 text-center">
|
||||
<div class="g p-8 text-center">
|
||||
<div class="w-16 h-16 bg-gray-200 rounded-full flex items-center justify-center mx-auto mb-4">
|
||||
<svg class="w-8 h-8 text-gray-500"
|
||||
fill="none"
|
||||
@@ -42,7 +42,7 @@
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="flex items-center justify-center space-x-2">
|
||||
<div class="flex items-center justify-center space-x-2 mb-6">
|
||||
<button hx-get="/admin/subscribers?page={{ current_page - 1 }}"
|
||||
hx-target="#subscribers-list"
|
||||
hx-swap="innerHTML"
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<div class="flex-1 min-w-0">
|
||||
<div class="flex items-center space-x-2 mb-1">
|
||||
<a href="/users/{{ user.username }}"
|
||||
class="font-medium text-gray-900 group-hover:text-blue-600 transition-colors truncate">
|
||||
class="font-medium text-gray-900 group-hover:text-blue-600 hover:underline transition-colors truncate">
|
||||
{{ user.username }}
|
||||
</a>
|
||||
{% if user.role.to_string() == "admin" %}
|
||||
|
||||
@@ -16,9 +16,9 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="users-list" class="py-6">
|
||||
<div id="users-list">
|
||||
{% if users.is_empty() %}
|
||||
<div class="bg-gray-50 rounded-lg p-8 border-2 border-dashed border-gray-300 text-center">
|
||||
<div class="py-6 p-8 text-center">
|
||||
<div class="w-16 h-16 bg-gray-200 rounded-full flex items-center justify-center mx-auto mb-4">
|
||||
<svg class="w-8 h-8 text-gray-500"
|
||||
fill="none"
|
||||
|
||||
Reference in New Issue
Block a user