mirror of
https://github.com/pacnpal/thrillwiki_django_no_react.git
synced 2025-12-22 15:31:08 -05:00
Enhance moderation dashboard UI and UX:
- Add HTMX-powered filtering with instant updates - Add smooth transitions and loading states - Improve visual hierarchy and styling - Add review notes functionality - Add confirmation dialogs for actions - Make navigation sticky - Add hover effects and visual feedback - Improve dark mode support
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# Generated by Django 5.1.2 on 2024-10-30 00:41
|
||||
# Generated by Django 5.1.3 on 2024-11-12 18:07
|
||||
|
||||
import django.db.models.deletion
|
||||
from django.conf import settings
|
||||
@@ -27,38 +27,48 @@ class Migration(migrations.Migration):
|
||||
verbose_name="ID",
|
||||
),
|
||||
),
|
||||
("object_id", models.PositiveIntegerField()),
|
||||
("object_id", models.PositiveIntegerField(blank=True, null=True)),
|
||||
(
|
||||
"submission_type",
|
||||
models.CharField(
|
||||
choices=[("EDIT", "Edit Existing"), ("CREATE", "Create New")],
|
||||
default="EDIT",
|
||||
max_length=10,
|
||||
),
|
||||
),
|
||||
(
|
||||
"changes",
|
||||
models.JSONField(
|
||||
help_text="JSON representation of the changes made"
|
||||
help_text="JSON representation of the changes or new object data"
|
||||
),
|
||||
),
|
||||
("reason", models.TextField(help_text="Why this edit is needed")),
|
||||
(
|
||||
"reason",
|
||||
models.TextField(help_text="Why this edit/addition is needed"),
|
||||
),
|
||||
(
|
||||
"source",
|
||||
models.TextField(
|
||||
blank=True,
|
||||
help_text="Source of information for this edit (if applicable)",
|
||||
blank=True, help_text="Source of information (if applicable)"
|
||||
),
|
||||
),
|
||||
(
|
||||
"status",
|
||||
models.CharField(
|
||||
choices=[
|
||||
("PENDING", "Pending"),
|
||||
("NEW", "New"),
|
||||
("APPROVED", "Approved"),
|
||||
("REJECTED", "Rejected"),
|
||||
("AUTO_APPROVED", "Auto Approved"),
|
||||
("ESCALATED", "Escalated"),
|
||||
],
|
||||
default="PENDING",
|
||||
default="NEW",
|
||||
max_length=20,
|
||||
),
|
||||
),
|
||||
("submitted_at", models.DateTimeField(auto_now_add=True)),
|
||||
("reviewed_at", models.DateTimeField(blank=True, null=True)),
|
||||
("created_at", models.DateTimeField(auto_now_add=True)),
|
||||
("handled_at", models.DateTimeField(blank=True, null=True)),
|
||||
(
|
||||
"review_notes",
|
||||
"notes",
|
||||
models.TextField(
|
||||
blank=True,
|
||||
help_text="Notes from the moderator about this submission",
|
||||
@@ -72,12 +82,12 @@ class Migration(migrations.Migration):
|
||||
),
|
||||
),
|
||||
(
|
||||
"reviewed_by",
|
||||
"handled_by",
|
||||
models.ForeignKey(
|
||||
blank=True,
|
||||
null=True,
|
||||
on_delete=django.db.models.deletion.SET_NULL,
|
||||
related_name="reviewed_submissions",
|
||||
related_name="handled_submissions",
|
||||
to=settings.AUTH_USER_MODEL,
|
||||
),
|
||||
),
|
||||
@@ -91,7 +101,7 @@ class Migration(migrations.Migration):
|
||||
),
|
||||
],
|
||||
options={
|
||||
"ordering": ["-submitted_at"],
|
||||
"ordering": ["-created_at"],
|
||||
"indexes": [
|
||||
models.Index(
|
||||
fields=["content_type", "object_id"],
|
||||
@@ -123,19 +133,19 @@ class Migration(migrations.Migration):
|
||||
"status",
|
||||
models.CharField(
|
||||
choices=[
|
||||
("PENDING", "Pending"),
|
||||
("NEW", "New"),
|
||||
("APPROVED", "Approved"),
|
||||
("REJECTED", "Rejected"),
|
||||
("AUTO_APPROVED", "Auto Approved"),
|
||||
],
|
||||
default="PENDING",
|
||||
default="NEW",
|
||||
max_length=20,
|
||||
),
|
||||
),
|
||||
("submitted_at", models.DateTimeField(auto_now_add=True)),
|
||||
("reviewed_at", models.DateTimeField(blank=True, null=True)),
|
||||
("created_at", models.DateTimeField(auto_now_add=True)),
|
||||
("handled_at", models.DateTimeField(blank=True, null=True)),
|
||||
(
|
||||
"review_notes",
|
||||
"notes",
|
||||
models.TextField(
|
||||
blank=True,
|
||||
help_text="Notes from the moderator about this photo submission",
|
||||
@@ -149,12 +159,12 @@ class Migration(migrations.Migration):
|
||||
),
|
||||
),
|
||||
(
|
||||
"reviewed_by",
|
||||
"handled_by",
|
||||
models.ForeignKey(
|
||||
blank=True,
|
||||
null=True,
|
||||
on_delete=django.db.models.deletion.SET_NULL,
|
||||
related_name="reviewed_photos",
|
||||
related_name="handled_photos",
|
||||
to=settings.AUTH_USER_MODEL,
|
||||
),
|
||||
),
|
||||
@@ -168,7 +178,7 @@ class Migration(migrations.Migration):
|
||||
),
|
||||
],
|
||||
options={
|
||||
"ordering": ["-submitted_at"],
|
||||
"ordering": ["-created_at"],
|
||||
"indexes": [
|
||||
models.Index(
|
||||
fields=["content_type", "object_id"],
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
# Generated by Django 5.1.2 on 2024-10-30 01:07
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("moderation", "0001_initial"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name="editsubmission",
|
||||
name="submission_type",
|
||||
field=models.CharField(
|
||||
choices=[("EDIT", "Edit Existing"), ("CREATE", "Create New")],
|
||||
default="EDIT",
|
||||
max_length=10,
|
||||
),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name="editsubmission",
|
||||
name="changes",
|
||||
field=models.JSONField(
|
||||
help_text="JSON representation of the changes or new object data"
|
||||
),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name="editsubmission",
|
||||
name="object_id",
|
||||
field=models.PositiveIntegerField(blank=True, null=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name="editsubmission",
|
||||
name="reason",
|
||||
field=models.TextField(help_text="Why this edit/addition is needed"),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name="editsubmission",
|
||||
name="source",
|
||||
field=models.TextField(
|
||||
blank=True, help_text="Source of information (if applicable)"
|
||||
),
|
||||
),
|
||||
]
|
||||
@@ -1,107 +0,0 @@
|
||||
# Generated manually
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('moderation', '0002_editsubmission_submission_type_and_more'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
# EditSubmission changes
|
||||
migrations.RenameField(
|
||||
model_name='editsubmission',
|
||||
old_name='submitted_at',
|
||||
new_name='created_at',
|
||||
),
|
||||
migrations.RenameField(
|
||||
model_name='editsubmission',
|
||||
old_name='reviewed_by',
|
||||
new_name='handled_by',
|
||||
),
|
||||
migrations.RenameField(
|
||||
model_name='editsubmission',
|
||||
old_name='reviewed_at',
|
||||
new_name='handled_at',
|
||||
),
|
||||
migrations.RenameField(
|
||||
model_name='editsubmission',
|
||||
old_name='review_notes',
|
||||
new_name='notes',
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='editsubmission',
|
||||
name='status',
|
||||
field=models.CharField(
|
||||
choices=[
|
||||
('NEW', 'New'),
|
||||
('APPROVED', 'Approved'),
|
||||
('REJECTED', 'Rejected'),
|
||||
('ESCALATED', 'Escalated'),
|
||||
],
|
||||
default='NEW',
|
||||
max_length=20,
|
||||
),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='editsubmission',
|
||||
name='handled_by',
|
||||
field=models.ForeignKey(
|
||||
blank=True,
|
||||
null=True,
|
||||
on_delete=django.db.models.deletion.SET_NULL,
|
||||
related_name='handled_submissions',
|
||||
to='accounts.user',
|
||||
),
|
||||
),
|
||||
|
||||
# PhotoSubmission changes
|
||||
migrations.RenameField(
|
||||
model_name='photosubmission',
|
||||
old_name='submitted_at',
|
||||
new_name='created_at',
|
||||
),
|
||||
migrations.RenameField(
|
||||
model_name='photosubmission',
|
||||
old_name='reviewed_by',
|
||||
new_name='handled_by',
|
||||
),
|
||||
migrations.RenameField(
|
||||
model_name='photosubmission',
|
||||
old_name='reviewed_at',
|
||||
new_name='handled_at',
|
||||
),
|
||||
migrations.RenameField(
|
||||
model_name='photosubmission',
|
||||
old_name='review_notes',
|
||||
new_name='notes',
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='photosubmission',
|
||||
name='status',
|
||||
field=models.CharField(
|
||||
choices=[
|
||||
('NEW', 'New'),
|
||||
('APPROVED', 'Approved'),
|
||||
('REJECTED', 'Rejected'),
|
||||
('AUTO_APPROVED', 'Auto Approved'),
|
||||
],
|
||||
default='NEW',
|
||||
max_length=20,
|
||||
),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='photosubmission',
|
||||
name='handled_by',
|
||||
field=models.ForeignKey(
|
||||
blank=True,
|
||||
null=True,
|
||||
on_delete=django.db.models.deletion.SET_NULL,
|
||||
related_name='handled_photos',
|
||||
to='accounts.user',
|
||||
),
|
||||
),
|
||||
]
|
||||
@@ -1,21 +0,0 @@
|
||||
# Generated by Django 5.1.2 on 2024-11-02 23:30
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("moderation", "0003_rename_fields_and_update_status"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterModelOptions(
|
||||
name="editsubmission",
|
||||
options={"ordering": ["-created_at"]},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name="photosubmission",
|
||||
options={"ordering": ["-created_at"]},
|
||||
),
|
||||
]
|
||||
Reference in New Issue
Block a user