Abuse Reports: Update statuses #116
18
abuse/migrations/0007_alter_abusereport_status.py
Normal file
18
abuse/migrations/0007_alter_abusereport_status.py
Normal 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),
|
||||
),
|
||||
]
|
@ -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.
|
||||
|
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user