Fixes #5962: Ensure consistent display of change log action labels

This commit is contained in:
Jeremy Stretch 2021-03-11 13:42:26 -05:00
parent cb9478e0ea
commit 132b1ff479
2 changed files with 2 additions and 7 deletions

View File

@ -5,6 +5,7 @@
### Bug Fixes
* [#5595](https://github.com/netbox-community/netbox/issues/5595) - Restore ability to delete an uploaded device type image
* [#5962](https://github.com/netbox-community/netbox/issues/5962) - Ensure consistent display of change log action labels
---

View File

@ -304,13 +304,7 @@
{% for change in changelog %}
{% with action=change.get_action_display|lower %}
<div class="list-group-item">
{% if action == 'created' %}
<span class="label label-success">Created</span>
{% elif action == 'updated' %}
<span class="label label-warning">Modified</span>
{% elif action == 'deleted' %}
<span class="label label-danger">Deleted</span>
{% endif %}
<span class="label label-{{ change.get_action_class }}">{{ change.get_action_display }}</span>
{{ change.changed_object_type.name|bettertitle }}
{% if change.changed_object.get_absolute_url %}
<a href="{{ change.changed_object.get_absolute_url }}">{{ change.changed_object }}</a>