mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-07 16:18:16 -06:00
Misc cleanup
This commit is contained in:
parent
a98b6a6fdf
commit
dec7ac79bf
@ -1,5 +1,3 @@
|
|||||||
# Generated by Django 5.0.8 on 2024-08-22 19:39
|
|
||||||
|
|
||||||
from django.db import migrations, models
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
@ -60,13 +60,9 @@ def custom_links(context, obj):
|
|||||||
|
|
||||||
# Add non-grouped links
|
# Add non-grouped links
|
||||||
else:
|
else:
|
||||||
|
button_class = 'outline-secondary' if cl.button_class == ButtonColorChoices.DEFAULT else cl.button_class
|
||||||
try:
|
try:
|
||||||
if rendered := cl.render(link_context):
|
if rendered := cl.render(link_context):
|
||||||
if cl.button_class == ButtonColorChoices.DEFAULT:
|
|
||||||
button_class = 'outline-secondary'
|
|
||||||
else:
|
|
||||||
button_class = cl.button_class
|
|
||||||
|
|
||||||
template_code += LINK_BUTTON.format(
|
template_code += LINK_BUTTON.format(
|
||||||
rendered['link'], rendered['link_target'], button_class, rendered['text']
|
rendered['link'], rendered['link_target'], button_class, rendered['text']
|
||||||
)
|
)
|
||||||
|
@ -81,9 +81,6 @@ class ColorChoices(ChoiceSet):
|
|||||||
#
|
#
|
||||||
|
|
||||||
class ButtonColorChoices(ChoiceSet):
|
class ButtonColorChoices(ChoiceSet):
|
||||||
"""
|
|
||||||
Map standard button color choices to Bootstrap 3 button classes
|
|
||||||
"""
|
|
||||||
DEFAULT = 'default'
|
DEFAULT = 'default'
|
||||||
BLUE = 'blue'
|
BLUE = 'blue'
|
||||||
INDIGO = 'indigo'
|
INDIGO = 'indigo'
|
||||||
|
Loading…
Reference in New Issue
Block a user