diff --git a/assets/migrations/0010_assetstatus_display_class.py b/assets/migrations/0010_assetstatus_display_class.py new file mode 100644 index 00000000..f2521ea0 --- /dev/null +++ b/assets/migrations/0010_assetstatus_display_class.py @@ -0,0 +1,18 @@ +# Generated by Django 2.0.13 on 2020-01-02 19:35 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('assets', '0009_auto_20200102_1933'), + ] + + operations = [ + migrations.AddField( + model_name='assetstatus', + name='display_class', + field=models.TextField(default='', help_text='HTML class to be appended to alter display of assets with this status, such as in the list.'), + ), + ] diff --git a/assets/models.py b/assets/models.py index 3354bccf..bd3d2615 100644 --- a/assets/models.py +++ b/assets/models.py @@ -33,6 +33,7 @@ class AssetStatus(models.Model): name = models.CharField(max_length=80) should_show = models.BooleanField( default=True, help_text="Should this be shown by default in the asset list.") + display_class = models.CharField(max_length=80, help_text="HTML class to be appended to alter display of assets with this status, such as in the list.") def __str__(self): return self.name diff --git a/assets/templates/partials/asset_list_table_body.html b/assets/templates/partials/asset_list_table_body.html index ab8bcd8d..c952159d 100644 --- a/assets/templates/partials/asset_list_table_body.html +++ b/assets/templates/partials/asset_list_table_body.html @@ -1,20 +1,6 @@ {% for item in object_list %} {#
  • {{ item.asset_id }} - {{ item.description }}
  • #} - + {{ item.asset_id }} {{ item.description }} {{ item.category }}