Closes #8302: Linkify role column in device & VM tables

This commit is contained in:
jeremystretch 2022-01-10 09:48:14 -05:00
parent 02519b270e
commit 076ca46ab4
6 changed files with 14 additions and 9 deletions

View File

@ -7,6 +7,7 @@
* [#8246](https://github.com/netbox-community/netbox/issues/8246) - Show human-friendly values for commit rates in circuits table
* [#8262](https://github.com/netbox-community/netbox/issues/8262) - Add cable count to tenant stats
* [#8265](https://github.com/netbox-community/netbox/issues/8265) - Add Stackwise-n interface types
* [#8302](https://github.com/netbox-community/netbox/issues/8302) - Linkify role column in device & VM tables
### Bug Fixes

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -597,6 +597,10 @@ span.color-label {
box-shadow: $box-shadow-sm;
}
.badge a {
color: inherit;
}
.btn {
white-space: nowrap;
}

View File

@ -333,7 +333,7 @@ class ColoredLabelColumn(tables.TemplateColumn):
{% load helpers %}
{% if value %}
<span class="badge" style="color: {{ value.color|fgcolor }}; background-color: #{{ value.color }}">
{{ value }}
<a href="{{ value.get_absolute_url }}">{{ value }}</a>
</span>
{% else %}
&mdash;