Misc cleanup

This commit is contained in:
Jeremy Stretch 2024-08-27 14:16:35 -04:00
parent a98b6a6fdf
commit dec7ac79bf
3 changed files with 1 additions and 10 deletions

View File

@ -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

View File

@ -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']
) )

View File

@ -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'