1
0
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:
jeremystretch
2021-07-20 13:46:59 -04:00
parent ba3552b697
commit a5dda0705e
16 changed files with 31 additions and 48 deletions

View File

@ -16,7 +16,7 @@
{% block extra_controls %} {% block extra_controls %}
{% if perms.dcim.change_device %} {% if perms.dcim.change_device %}
<div class="dropdown m-1"> <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 <i class="mdi mdi-plus-thick" aria-hidden="true"></i> Add Components
</button> </button>
<ul class="dropdown-menu" aria-labeled-by="add-device-components"> <ul class="dropdown-menu" aria-labeled-by="add-device-components">

View File

@ -5,7 +5,7 @@
{% block extra_controls %} {% block extra_controls %}
{% if perms.dcim.add_interface and not object.is_virtual %} {% 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 <span class="mdi mdi-plus-thick" aria-hidden="true"></span> Add Child Interface
</a> </a>
{% endif %} {% endif %}

View File

@ -18,15 +18,15 @@
{% endblock %} {% endblock %}
{% block extra_controls %} {% 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> <i class="mdi mdi-file-image-outline"></i>
Hide Images Hide Images
</button> </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 %}"> <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 Rack <i class="mdi mdi-chevron-left" aria-hidden="true"></i> Previous
</a> </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 %}"> <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 Rack <i class="mdi mdi-chevron-right" aria-hidden="true"></i> Next
</a> </a>
{% endblock %} {% endblock %}

View File

@ -37,7 +37,7 @@
{# Extra buttons #} {# Extra buttons #}
{% block extra_controls %}{% endblock %} {% block extra_controls %}{% endblock %}
{% if request.user|can_add:object %} {% if object.clone_fields and request.user|can_add:object %}
{% clone_button object %} {% clone_button object %}
{% endif %} {% endif %}
{% if request.user|can_change:object %} {% if request.user|can_change:object %}

View File

@ -1,10 +1,10 @@
{% load helpers %} {% load helpers %}
{% if show_available is not None %} {% if show_available is not None %}
<div class="btn-group m-1" role="group"> <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 <i class="mdi mdi-eye"></i> Show Available
</a> </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 <i class="mdi mdi-eye-off"></i> Hide Available
</a> </a>
</div> </div>

View File

@ -2,9 +2,8 @@
{% block extra_controls %} {% block extra_controls %}
{% if perms.ipam.add_ipaddress and active_tab == 'ip-addresses' and object.first_available_ip %} {% 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"> <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> <i class="mdi mdi-plus-thick" aria-hidden="true"></i> Add IP Address
Add an IP Address
</a> </a>
{% endif %} {% endif %}
{% endblock %} {% endblock %}

View File

@ -2,9 +2,8 @@
{% block extra_controls %} {% block extra_controls %}
{% if perms.ipam.add_ipaddress and active_tab == 'ip-addresses' and first_available_ip %} {% 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"> <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> <i class="mdi mdi-plus-thick" aria-hidden="true"></i> Add IP Address
Add an IP Address
</a> </a>
{% endif %} {% endif %}
{% endblock %} {% endblock %}

View File

@ -13,21 +13,6 @@
{% endif %} {% endif %}
{% endblock %} {% 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 %} {% block content %}
<div class="row mb-3"> <div class="row mb-3">
<div class="col col-md-6"> <div class="col col-md-6">

View File

@ -13,12 +13,12 @@
{% block extra_controls %} {% block extra_controls %}
{% if perms.virtualization.change_cluster and perms.virtualization.add_virtualmachine %} {% 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 <span class="mdi mdi-plus-thick" aria-hidden="true"></span> Add Virtual Machine
</a> </a>
{% endif %} {% endif %}
{% if perms.virtualization.change_cluster %} {% 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 <span class="mdi mdi-plus-thick" aria-hidden="true"></span> Assign Device
</a> </a>
{% endif %} {% endif %}

View File

@ -10,7 +10,7 @@
{% block extra_controls %} {% block extra_controls %}
{% if perms.virtualization.add_vminterface %} {% 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 <span class="mdi mdi-plus-thick" aria-hidden="true"></span> Add Interfaces
</a> </a>
{% endif %} {% endif %}

View File

@ -1,5 +1,5 @@
<div class="d-flex flex-shrink-1 m-1"> <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> <i class="mdi mdi-plus-thick"></i>
&nbsp;Add &nbsp;Add
</a> </a>

View File

@ -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>&nbsp;Clone <i class="mdi mdi-content-copy" aria-hidden="true"></i>&nbsp;Clone
</a> </a>

View File

@ -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>&nbsp;Delete <span class="mdi mdi-trash-can-outline" aria-hidden="true"></span>&nbsp;Delete
</a> </a>

View File

@ -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>&nbsp;Edit <span class="mdi mdi-pencil" aria-hidden="true"></span>&nbsp;Edit
</a> </a>

View File

@ -1,5 +1,5 @@
<div class="dropdown m-1"> <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>&nbsp;Export <i class="mdi mdi-download"></i>&nbsp;Export
</button> </button>
<ul class="dropdown-menu dropdown-menu-end"> <ul class="dropdown-menu dropdown-menu-end">

View File

@ -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>&nbsp;Import <i class="mdi mdi-upload"></i>&nbsp;Import
</a> </a>