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

Replace ButtonsColumn with ActionsColumn

This commit is contained in:
jeremystretch
2022-01-10 11:17:40 -05:00
parent 8b07fbc554
commit aed23d61fc
8 changed files with 90 additions and 165 deletions

View File

@@ -3,9 +3,9 @@ import django_tables2 as tables
from dcim.models import Location, Region, Site, SiteGroup
from tenancy.tables import TenantColumn
from utilities.tables import (
BaseTable, ButtonsColumn, ChoiceFieldColumn, LinkedCountColumn, MarkdownColumn, MPTTColumn, TagColumn, ToggleColumn,
ActionsColumn, BaseTable, ChoiceFieldColumn, LinkedCountColumn, MarkdownColumn, MPTTColumn, TagColumn, ToggleColumn,
)
from .template_code import LOCATION_ELEVATIONS
from .template_code import LOCATION_BUTTONS
__all__ = (
'LocationTable',
@@ -127,9 +127,8 @@ class LocationTable(BaseTable):
tags = TagColumn(
url_name='dcim:location_list'
)
actions = ButtonsColumn(
model=Location,
prepend_template=LOCATION_ELEVATIONS
actions = ActionsColumn(
extra_buttons=LOCATION_BUTTONS
)
class Meta(BaseTable.Meta):