Abuse Reports: Update statuses #116

Merged
Pablo Vazquez merged 1 commits from tmp-abuse-report-statuses into main 2024-05-06 16:29:58 +02:00
3 changed files with 23 additions and 5 deletions

View File

@ -0,0 +1,18 @@
# Generated by Django 4.2.11 on 2024-05-06 13:30
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('abuse', '0006_remove_abusereport_date_deleted'),
]
operations = [
migrations.AlterField(
model_name='abusereport',
name='status',
field=models.PositiveSmallIntegerField(choices=[(1, 'Untriaged'), (2, 'Confirmed'), (3, 'Resolved')], default=1),
),
]

View File

@ -29,8 +29,8 @@ class AbuseReport(CreatedModifiedMixin, TrackChangesMixin, models.Model):
STATUSES = Choices(
('UNTRIAGED', 1, 'Untriaged'),
('VALID', 2, 'Valid'),
('SUSPICIOUS', 3, 'Suspicious'),
('CONFIRMED', 2, 'Confirmed'),
('RESOLVED', 3, 'Resolved'),
)
# NULL if the reporter is anonymous.

View File

@ -29,17 +29,17 @@
<span>{{ status }}</span>
</div>
{% elif 'untriaged' in status.lower %}
{% elif 'confirmed' in status.lower %}
<div class="badge badge-danger {{ class }}">
<span>{{ status }}</span>
</div>
{% elif 'suspicious' in status.lower %}
{% elif 'untriaged' in status.lower %}
<div class="badge badge-warning {{ class }}">
<span>{{ status }}</span>
</div>
{% elif 'valid' in status.lower %}
{% elif 'resolved' in status.lower %}
<div class="badge badge-success {{ class }}">
<span>{{ status }}</span>
</div>