mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Standardize button colors
This commit is contained in:
@ -16,7 +16,7 @@
|
||||
{% block extra_controls %}
|
||||
{% if perms.dcim.change_device %}
|
||||
<div class="dropdown m-1">
|
||||
<button id="add-device-components" type="button" class="btn btn-sm btn-primary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<button id="add-device-components" type="button" class="btn btn-sm btn-blue-500 dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<i class="mdi mdi-plus-thick" aria-hidden="true"></i> Add Components
|
||||
</button>
|
||||
<ul class="dropdown-menu" aria-labeled-by="add-device-components">
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
{% block extra_controls %}
|
||||
{% if perms.dcim.add_interface and not object.is_virtual %}
|
||||
<a href="{% url 'dcim:interface_add' %}?device={{ object.device.pk }}&parent={{ object.pk }}&return_url={{ object.get_absolute_url }}" class="btn btn-sm btn-success m-1">
|
||||
<a href="{% url 'dcim:interface_add' %}?device={{ object.device.pk }}&parent={{ object.pk }}&return_url={{ object.get_absolute_url }}" class="btn btn-sm btn-green-400 m-1">
|
||||
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> Add Child Interface
|
||||
</a>
|
||||
{% endif %}
|
||||
|
@ -18,15 +18,15 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_controls %}
|
||||
<button class="btn btn-sm btn-outline-primary m-1 toggle-images" selected="selected">
|
||||
<button class="btn btn-sm btn-outline-blue-500 m-1 toggle-images" selected="selected">
|
||||
<i class="mdi mdi-file-image-outline"></i>
|
||||
Hide Images
|
||||
</button>
|
||||
<a {% if prev_rack %}href="{% url 'dcim:rack' pk=prev_rack.pk %}{% endif %}" class="btn btn-sm btn-primary m-1{% if not prev_rack %} disabled{% endif %}">
|
||||
<i class="mdi mdi-chevron-left" aria-hidden="true"></i> Previous Rack
|
||||
<a {% if prev_rack %}href="{% url 'dcim:rack' pk=prev_rack.pk %}{% endif %}" class="btn btn-sm btn-blue-500 m-1{% if not prev_rack %} disabled{% endif %}">
|
||||
<i class="mdi mdi-chevron-left" aria-hidden="true"></i> Previous
|
||||
</a>
|
||||
<a {% if next_rack %}href="{% url 'dcim:rack' pk=next_rack.pk %}{% endif %}" class="btn btn-sm btn-primary m-1{% if not next_rack %} disabled{% endif %}">
|
||||
<i class="mdi mdi-chevron-right" aria-hidden="true"></i> Next Rack
|
||||
<a {% if next_rack %}href="{% url 'dcim:rack' pk=next_rack.pk %}{% endif %}" class="btn btn-sm btn-blue-500 m-1{% if not next_rack %} disabled{% endif %}">
|
||||
<i class="mdi mdi-chevron-right" aria-hidden="true"></i> Next
|
||||
</a>
|
||||
{% endblock %}
|
||||
|
||||
|
@ -37,15 +37,15 @@
|
||||
{# Extra buttons #}
|
||||
{% block extra_controls %}{% endblock %}
|
||||
|
||||
{% if request.user|can_add:object %}
|
||||
{% clone_button object %}
|
||||
{% endif %}
|
||||
{% if request.user|can_change:object %}
|
||||
{% edit_button object %}
|
||||
{% endif %}
|
||||
{% if request.user|can_delete:object %}
|
||||
{% delete_button object %}
|
||||
{% endif %}
|
||||
{% if object.clone_fields and request.user|can_add:object %}
|
||||
{% clone_button object %}
|
||||
{% endif %}
|
||||
{% if request.user|can_change:object %}
|
||||
{% edit_button object %}
|
||||
{% endif %}
|
||||
{% if request.user|can_delete:object %}
|
||||
{% delete_button object %}
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,10 +1,10 @@
|
||||
{% load helpers %}
|
||||
{% if show_available is not None %}
|
||||
<div class="btn-group m-1" role="group">
|
||||
<a href="{{ request.path }}{% querystring request show_available='true' %}" class="btn btn-sm btn-outline-secondary{% if show_available %} active disabled{% endif %}">
|
||||
<a href="{{ request.path }}{% querystring request show_available='true' %}" class="btn btn-sm btn-outline-blue-500{% if show_available %} active disabled{% endif %}">
|
||||
<i class="mdi mdi-eye"></i> Show Available
|
||||
</a>
|
||||
<a href="{{ request.path }}{% querystring request show_available='false' %}" class="btn btn-sm btn-outline-secondary{% if not show_available %} active disabled{% endif %}">
|
||||
<a href="{{ request.path }}{% querystring request show_available='false' %}" class="btn btn-sm btn-outline-blue-500{% if not show_available %} active disabled{% endif %}">
|
||||
<i class="mdi mdi-eye-off"></i> Hide Available
|
||||
</a>
|
||||
</div>
|
||||
|
@ -2,9 +2,8 @@
|
||||
|
||||
{% block extra_controls %}
|
||||
{% if perms.ipam.add_ipaddress and active_tab == 'ip-addresses' and object.first_available_ip %}
|
||||
<a href="{% url 'ipam:ipaddress_add' %}?address={{ object.first_available_ip }}&vrf={{ object.vrf.pk }}&tenant_group={{ object.tenant.group.pk }}&tenant={{ object.tenant.pk }}" class="btn btn-sm btn-outline-success m-1">
|
||||
<i class="mdi mdi-plus-thick" aria-hidden="true"></i>
|
||||
Add an IP Address
|
||||
<a href="{% url 'ipam:ipaddress_add' %}?address={{ object.first_available_ip }}&vrf={{ object.vrf.pk }}&tenant_group={{ object.tenant.group.pk }}&tenant={{ object.tenant.pk }}" class="btn btn-sm btn-blue-500 m-1">
|
||||
<i class="mdi mdi-plus-thick" aria-hidden="true"></i> Add IP Address
|
||||
</a>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
@ -2,9 +2,8 @@
|
||||
|
||||
{% block extra_controls %}
|
||||
{% if perms.ipam.add_ipaddress and active_tab == 'ip-addresses' and first_available_ip %}
|
||||
<a href="{% url 'ipam:ipaddress_add' %}?address={{ first_available_ip }}&vrf={{ object.vrf.pk }}&tenant_group={{ object.tenant.group.pk }}&tenant={{ object.tenant.pk }}" class="btn btn-sm btn-outline-success m-1">
|
||||
<i class="mdi mdi-plus-thick" aria-hidden="true"></i>
|
||||
Add an IP Address
|
||||
<a href="{% url 'ipam:ipaddress_add' %}?address={{ first_available_ip }}&vrf={{ object.vrf.pk }}&tenant_group={{ object.tenant.group.pk }}&tenant={{ object.tenant.pk }}" class="btn btn-sm btn-blue-500 m-1">
|
||||
<i class="mdi mdi-plus-thick" aria-hidden="true"></i> Add IP Address
|
||||
</a>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
@ -13,21 +13,6 @@
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block controls %}
|
||||
{% plugin_buttons object %}
|
||||
<div class="container mb-2 mx-0">
|
||||
<div class="d-flex flex-wrap justify-content-end">
|
||||
{% block extra_controls %}{% endblock %}
|
||||
{% if request.user|can_change:object %}
|
||||
{% edit_button object %}
|
||||
{% endif %}
|
||||
{% if request.user|can_delete:object %}
|
||||
{% delete_button object %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="row mb-3">
|
||||
<div class="col col-md-6">
|
||||
|
@ -13,12 +13,12 @@
|
||||
|
||||
{% block extra_controls %}
|
||||
{% if perms.virtualization.change_cluster and perms.virtualization.add_virtualmachine %}
|
||||
<a href="{% url 'virtualization:virtualmachine_add' %}?cluster_id={{ object.pk }}&return_url={{ object.get_absolute_url }}" class="btn btn-sm btn-primary m-1">
|
||||
<a href="{% url 'virtualization:virtualmachine_add' %}?cluster_id={{ object.pk }}&return_url={{ object.get_absolute_url }}" class="btn btn-sm btn-blue-500 m-1">
|
||||
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> Add Virtual Machine
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if perms.virtualization.change_cluster %}
|
||||
<a href="{% url 'virtualization:cluster_add_devices' pk=object.pk %}?site_id={{ object.site.pk }}&return_url={{ object.get_absolute_url }}" class="btn btn-primary btn-sm m-1">
|
||||
<a href="{% url 'virtualization:cluster_add_devices' pk=object.pk %}?site_id={{ object.site.pk }}&return_url={{ object.get_absolute_url }}" class="btn btn-blue-500 btn-sm m-1">
|
||||
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> Assign Device
|
||||
</a>
|
||||
{% endif %}
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
{% block extra_controls %}
|
||||
{% if perms.virtualization.add_vminterface %}
|
||||
<a href="{% url 'virtualization:vminterface_add' %}?virtual_machine={{ object.pk }}&return_url={% url 'virtualization:virtualmachine_interfaces' pk=object.pk %}" class="btn btn-sm btn-primary m-1">
|
||||
<a href="{% url 'virtualization:vminterface_add' %}?virtual_machine={{ object.pk }}&return_url={% url 'virtualization:virtualmachine_interfaces' pk=object.pk %}" class="btn btn-sm btn-blue-500 m-1">
|
||||
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> Add Interfaces
|
||||
</a>
|
||||
{% endif %}
|
||||
|
@ -1,5 +1,5 @@
|
||||
<div class="d-flex flex-shrink-1 m-1">
|
||||
<a href="{{ add_url }}" type="button" class="btn btn-sm btn-success">
|
||||
<a href="{{ add_url }}" type="button" class="btn btn-sm btn-green-500">
|
||||
<i class="mdi mdi-plus-thick"></i>
|
||||
Add
|
||||
</a>
|
||||
|
@ -1,3 +1,3 @@
|
||||
<a href="{{ url }}" class="btn btn-sm btn-success m-1" role="button">
|
||||
<a href="{{ url }}" class="btn btn-sm btn-green-400 m-1" role="button">
|
||||
<i class="mdi mdi-content-copy" aria-hidden="true"></i> Clone
|
||||
</a>
|
||||
|
@ -1,3 +1,3 @@
|
||||
<a href="{{ url }}" class="btn btn-sm btn-danger m-1" role="button">
|
||||
<a href="{{ url }}" class="btn btn-sm btn-red-500 m-1" role="button">
|
||||
<span class="mdi mdi-trash-can-outline" aria-hidden="true"></span> Delete
|
||||
</a>
|
||||
|
@ -1,3 +1,3 @@
|
||||
<a href="{{ url }}" class="btn btn-sm btn-warning m-1" role="button">
|
||||
<a href="{{ url }}" class="btn btn-sm btn-yellow-500 m-1" role="button">
|
||||
<span class="mdi mdi-pencil" aria-hidden="true"></span> Edit
|
||||
</a>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<div class="dropdown m-1">
|
||||
<button type="button" class="btn btn-sm btn-outline-secondary dropdown-toggle" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<button type="button" class="btn btn-sm btn-purple-500 dropdown-toggle" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<i class="mdi mdi-download"></i> Export
|
||||
</button>
|
||||
<ul class="dropdown-menu dropdown-menu-end">
|
||||
|
@ -1,3 +1,3 @@
|
||||
<a href="{% url import_url %}" type="button" class="btn btn-sm btn-outline-secondary m-1">
|
||||
<a href="{% url import_url %}" type="button" class="btn btn-sm btn-cyan-400 m-1">
|
||||
<i class="mdi mdi-upload"></i> Import
|
||||
</a>
|
||||
|
Reference in New Issue
Block a user