1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Colorized roles in rack and device lists

This commit is contained in:
Jeremy Stretch
2016-08-10 22:20:09 -04:00
parent 3324f397d9
commit 74528c6036
4 changed files with 32 additions and 13 deletions

View File

@@ -28,10 +28,3 @@ class ToggleColumn(tables.CheckBoxColumn):
@property
def header(self):
return mark_safe('<input type="checkbox" name="_all" title="Select all" />')
class ColorColumn(tables.Column):
def render(self, record):
html = '<label class="label {}">{}</label>'.format(record.color, record.get_color_display())
return mark_safe(html)