Răsfoiți Sursa

Closes #4382: Enable custom links for rack reservations

Jeremy Stretch 5 ani în urmă
părinte
comite
7f5571200c

+ 1 - 0
docs/release-notes/version-2.7.md

@@ -9,6 +9,7 @@
 * [#4369](https://github.com/netbox-community/netbox/issues/4369) - Add a dedicated view for rack reservations
 * [#4380](https://github.com/netbox-community/netbox/issues/4380) - Enable webhooks for rack reservations
 * [#4381](https://github.com/netbox-community/netbox/issues/4381) - Enable export templates for rack reservations
+* [#4382](https://github.com/netbox-community/netbox/issues/4382) - Enable custom links for rack reservations
 
 ### Bug Fixes
 

+ 1 - 1
netbox/dcim/models/__init__.py

@@ -739,7 +739,7 @@ class Rack(ChangeLoggedModel, CustomFieldModel):
         return 0
 
 
-@extras_features('export_templates', 'webhooks')
+@extras_features('custom_links', 'export_templates', 'webhooks')
 class RackReservation(ChangeLoggedModel):
     """
     One or more reserved units within a Rack.

+ 3 - 0
netbox/templates/dcim/rackreservation.html

@@ -36,6 +36,9 @@
     </div>
     <h1>{% block title %}{{ rackreservation }}{% endblock %}</h1>
     {% include 'inc/created_updated.html' with obj=rackreservation %}
+    <div class="pull-right noprint">
+        {% custom_links rackreservation %}
+    </div>
     <ul class="nav nav-tabs">
         <li role="presentation"{% if not active_tab %} class="active"{% endif %}>
             <a href="{{ rackreservation.get_absolute_url }}">Rack</a>