1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

added support for plugin nav bar links

This commit is contained in:
John Anderson
2020-03-17 02:35:12 -04:00
parent 457354c244
commit 981c982237
6 changed files with 167 additions and 2 deletions

View File

@@ -78,3 +78,29 @@ def unpack_grouped_choices(choices):
else:
unpacked_choices.append((key, value))
return unpacked_choices
#
# Button color choices
#
class ButtonColorChoices(ChoiceSet):
"""
Map standard button color choices to Bootstrap color classes
"""
BLUE = 'primary'
GREY = 'secondary'
GREEN = 'success'
RED = 'danger'
YELLOW = 'warning'
BLACK = 'dark'
CHOICES = (
(BLUE, 'Blue'),
(GREY, 'Grey'),
(GREEN, 'Green'),
(RED, 'Red'),
(YELLOW, 'Yellow'),
(BLACK, 'Black')
)