From 6b1418667440ae12211ef83ad5f6dda36b81bd4a Mon Sep 17 00:00:00 2001 From: Arthur Date: Fri, 31 Mar 2023 11:44:01 -0700 Subject: [PATCH] 12117 remove clone from cable --- netbox/templates/dcim/cable.html | 3 +++ netbox/templates/generic/object.html | 8 ++++++++ 2 files changed, 11 insertions(+) diff --git a/netbox/templates/dcim/cable.html b/netbox/templates/dcim/cable.html index bd0f27106..0557286b6 100644 --- a/netbox/templates/dcim/cable.html +++ b/netbox/templates/dcim/cable.html @@ -4,6 +4,9 @@ {% load perms %} {% load plugins %} +{# cable does not support the default clone control #} +{% block clone_button %}{% endblock clone_button %} + {% block content %}
diff --git a/netbox/templates/generic/object.html b/netbox/templates/generic/object.html index 023726a30..bc0237ccf 100644 --- a/netbox/templates/generic/object.html +++ b/netbox/templates/generic/object.html @@ -60,15 +60,23 @@ Context: {# Extra buttons #} {% block extra_controls %}{% endblock %} + {% block clone_button %} {% if request.user|can_add:object %} {% clone_button object %} {% endif %} + {% endblock clone_button %} + + {% block edit_button %} {% if request.user|can_change:object %} {% edit_button object %} {% endif %} + {% endblock edit_button %} + + {% block delete_button %} {% if request.user|can_delete:object %} {% delete_button object %} {% endif %} + {% endblock delete_button %}