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( STATUSES = Choices(
('UNTRIAGED', 1, 'Untriaged'), ('UNTRIAGED', 1, 'Untriaged'),
('VALID', 2, 'Valid'), ('CONFIRMED', 2, 'Confirmed'),
('SUSPICIOUS', 3, 'Suspicious'), ('RESOLVED', 3, 'Resolved'),
) )
# NULL if the reporter is anonymous. # NULL if the reporter is anonymous.

View File

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