mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-24 16:26:09 -06:00
Move disconnect bulk action into a separate template for device components
This commit is contained in:
parent
14dc2b56bd
commit
297479d32e
15
netbox/templates/dcim/device/components_base.html
Normal file
15
netbox/templates/dcim/device/components_base.html
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
{% extends 'generic/object_children.html' %}
|
||||||
|
{% load helpers %}
|
||||||
|
|
||||||
|
{% block bulk_edit_controls %}
|
||||||
|
{{ block.super }}
|
||||||
|
{% with bulk_rename_view=child_model|validated_viewname:"bulk_rename" %}
|
||||||
|
{% if 'bulk_rename' in actions and bulk_rename_view %}
|
||||||
|
<button type="submit" name="_rename"
|
||||||
|
formaction="{% url bulk_rename_view %}?return_url={{ return_url }}"
|
||||||
|
class="btn btn-outline-warning btn-sm">
|
||||||
|
<i class="mdi mdi-pencil-outline" aria-hidden="true"></i> Rename
|
||||||
|
</button>
|
||||||
|
{% endif %}
|
||||||
|
{% endwith %}
|
||||||
|
{% endblock bulk_edit_controls %}
|
@ -1,4 +1,4 @@
|
|||||||
{% extends 'generic/object_children.html' %}
|
{% extends 'dcim/device/components_base.html' %}
|
||||||
{% load helpers %}
|
{% load helpers %}
|
||||||
|
|
||||||
{% block bulk_delete_controls %}
|
{% block bulk_delete_controls %}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{% extends 'generic/object_children.html' %}
|
{% extends 'dcim/device/components_base.html' %}
|
||||||
{% load helpers %}
|
{% load helpers %}
|
||||||
|
|
||||||
{% block bulk_delete_controls %}
|
{% block bulk_delete_controls %}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{% extends 'generic/object_children.html' %}
|
{% extends 'dcim/device/components_base.html' %}
|
||||||
|
|
||||||
{% block bulk_extra_controls %}
|
{% block bulk_extra_controls %}
|
||||||
{{ block.super }}
|
{{ block.super }}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{% extends 'generic/object_children.html' %}
|
{% extends 'dcim/device/components_base.html' %}
|
||||||
{% load helpers %}
|
{% load helpers %}
|
||||||
|
|
||||||
{% block bulk_delete_controls %}
|
{% block bulk_delete_controls %}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{% extends 'generic/object_children.html' %}
|
{% extends 'dcim/device/components_base.html' %}
|
||||||
{% load helpers %}
|
{% load helpers %}
|
||||||
|
|
||||||
{% block bulk_delete_controls %}
|
{% block bulk_delete_controls %}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{% extends 'generic/object_children.html' %}
|
{% extends 'dcim/device/components_base.html' %}
|
||||||
|
|
||||||
{% block bulk_extra_controls %}
|
{% block bulk_extra_controls %}
|
||||||
{{ block.super }}
|
{{ block.super }}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{% extends 'generic/object_children.html' %}
|
{% extends 'dcim/device/components_base.html' %}
|
||||||
|
|
||||||
{% block bulk_extra_controls %}
|
{% block bulk_extra_controls %}
|
||||||
{{ block.super }}
|
{{ block.super }}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{% extends 'generic/object_children.html' %}
|
{% extends 'dcim/device/components_base.html' %}
|
||||||
{% load helpers %}
|
{% load helpers %}
|
||||||
|
|
||||||
{% block bulk_delete_controls %}
|
{% block bulk_delete_controls %}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{% extends 'generic/object_children.html' %}
|
{% extends 'dcim/device/components_base.html' %}
|
||||||
{% load helpers %}
|
{% load helpers %}
|
||||||
|
|
||||||
{% block bulk_delete_controls %}
|
{% block bulk_delete_controls %}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{% extends 'generic/object_children.html' %}
|
{% extends 'dcim/device/components_base.html' %}
|
||||||
{% load helpers %}
|
{% load helpers %}
|
||||||
|
|
||||||
{% block bulk_delete_controls %}
|
{% block bulk_delete_controls %}
|
||||||
|
@ -25,15 +25,6 @@
|
|||||||
</button>
|
</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endwith %}
|
{% endwith %}
|
||||||
{% with bulk_rename_view=child_model|validated_viewname:"bulk_rename" %}
|
|
||||||
{% if 'bulk_rename' in actions and bulk_rename_view %}
|
|
||||||
<button type="submit" name="_rename"
|
|
||||||
formaction="{% url bulk_rename_view %}?return_url={{ return_url }}"
|
|
||||||
class="btn btn-outline-warning btn-sm">
|
|
||||||
<i class="mdi mdi-pencil-outline" aria-hidden="true"></i> Rename
|
|
||||||
</button>
|
|
||||||
{% endif %}
|
|
||||||
{% endwith %}
|
|
||||||
{% endblock bulk_edit_controls %}
|
{% endblock bulk_edit_controls %}
|
||||||
</div>
|
</div>
|
||||||
<div class="btn-group" role="group">
|
<div class="btn-group" role="group">
|
||||||
|
Loading…
Reference in New Issue
Block a user