Jelajahi Sumber

Fixes #3573: Ensure consistent display of changelog retention period

Jeremy Stretch 6 tahun lalu
induk
melakukan
9198d6924e

+ 1 - 0
CHANGELOG.md

@@ -2,6 +2,7 @@ v2.6.6 (FUTURE)
 
 ## Bug Fixes
 
+* [#3573](https://github.com/netbox-community/netbox/issues/3573) - Ensure consistent display of changelog retention period
 * [#3574](https://github.com/netbox-community/netbox/issues/3574) - Change `device` to `parent` in interface editing VLAN filtering logic
 * [#3575](https://github.com/netbox-community/netbox/issues/3575) - Restore label for comments field when bulk editing circuits
 

+ 4 - 6
netbox/templates/extras/object_changelog.html

@@ -5,10 +5,8 @@
 {% block content %}
     {% if obj %}<h1>{{ obj }}</h1>{% endif %}
     {% include 'panel_table.html' %}
-        {% include 'inc/paginator.html' with paginator=table.paginator page=table.page %}
-    {% if settings.CHANGELOG_RETENTION %}
-        <div class="text-muted">
-            Changelog retention: {% if settings.CHANGELOG_RETENTION == 0 %}Indefinite{% else %}{{ settings.CHANGELOG_RETENTION }} days{% endif %}
-        </div>
-    {% endif %}
+    {% include 'inc/paginator.html' with paginator=table.paginator page=table.page %}
+    <div class="text-muted">
+        Changelog retention: {% if settings.CHANGELOG_RETENTION %}{{ settings.CHANGELOG_RETENTION }} days{% else %}Indefinite{% endif %}
+    </div>
 {% endblock %}

+ 3 - 5
netbox/templates/extras/objectchange_list.html

@@ -9,11 +9,9 @@
 <div class="row">
 	<div class="col-md-9">
         {% include 'utilities/obj_table.html' %}
-        {% if settings.CHANGELOG_RETENTION %}
-            <div class="pull-right text-muted">
-                Changelog retention: {% if settings.CHANGELOG_RETENTION == 0 %}Indefinite{% else %}{{ settings.CHANGELOG_RETENTION }} days{% endif %}
-            </div>
-        {% endif %}
+        <div class="text-muted text-right">
+            Changelog retention: {% if settings.CHANGELOG_RETENTION %}{{ settings.CHANGELOG_RETENTION }} days{% else %}Indefinite{% endif %}
+        </div>
     </div>
     <div class="col-md-3 noprint">
 		{% include 'inc/search_panel.html' %}