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

#6797: Improve controls & custom link styling

This commit is contained in:
Matt
2021-08-03 10:03:22 -07:00
parent 53e21ceed4
commit e8ba4b0564
28 changed files with 313 additions and 271 deletions

View File

@@ -46,28 +46,40 @@ class CustomFieldFilterLogicChoices(ChoiceSet):
class CustomLinkButtonClassChoices(ChoiceSet):
CLASS_DEFAULT = 'outline-dark'
CLASS_PRIMARY = 'primary'
CLASS_SUCCESS = 'success'
CLASS_INFO = 'info'
CLASS_WARNING = 'warning'
CLASS_DANGER = 'danger'
CLASS_LINK = 'link'
CLASS_LINK = 'ghost-dark'
CLASS_BLUE = 'blue'
CLASS_INDIGO = 'indigo'
CLASS_PURPLE = 'purple'
CLASS_PINK = 'pink'
CLASS_RED = 'red'
CLASS_ORANGE = 'orange'
CLASS_YELLOW = 'yellow'
CLASS_GREEN = 'green'
CLASS_TEAL = 'teal'
CLASS_CYAN = 'cyan'
CLASS_GRAY = 'secondary'
CHOICES = (
(CLASS_DEFAULT, 'Default'),
(CLASS_PRIMARY, 'Primary (blue)'),
(CLASS_SUCCESS, 'Success (green)'),
(CLASS_INFO, 'Info (aqua)'),
(CLASS_WARNING, 'Warning (orange)'),
(CLASS_DANGER, 'Danger (red)'),
(CLASS_LINK, 'None (link)'),
(CLASS_LINK, 'Link'),
(CLASS_BLUE, 'Blue'),
(CLASS_INDIGO, 'Indigo'),
(CLASS_PURPLE, 'Purple'),
(CLASS_PINK, 'Pink'),
(CLASS_RED, 'Red'),
(CLASS_ORANGE, 'Orange'),
(CLASS_YELLOW, 'Yellow'),
(CLASS_GREEN, 'Green'),
(CLASS_TEAL, 'Teal'),
(CLASS_CYAN, 'Cyan'),
(CLASS_GRAY, 'Gray'),
)
#
# ObjectChanges
#
class ObjectChangeActionChoices(ChoiceSet):
ACTION_CREATE = 'create'

View File

@@ -10,10 +10,10 @@ from utilities.utils import render_jinja2
register = template.Library()
LINK_BUTTON = '<a href="{}"{} class="btn btn-sm btn-{} m-1">{}</a>\n'
LINK_BUTTON = '<a href="{}"{} class="btn btn-sm btn-{}">{}</a>\n'
GROUP_BUTTON = """
<div class="dropdown m-1">
<div class="dropdown">
<button
class="btn btn-sm btn-{} dropdown-toggle"
type="button"