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

Add UI views for export templates

This commit is contained in:
jeremystretch
2021-06-23 20:39:35 -04:00
parent 276ded0119
commit 10cbbee947
12 changed files with 288 additions and 41 deletions

View File

@ -55,6 +55,7 @@ class CustomLinkTable(BaseTable):
name = tables.Column(
linkify=True
)
new_window = BooleanColumn()
class Meta(BaseTable.Meta):
model = CustomLink
@ -64,6 +65,27 @@ class CustomLinkTable(BaseTable):
default_columns = ('pk', 'name', 'content_type', 'group_name', 'button_class', 'new_window')
#
# Export templates
#
class ExportTemplateTable(BaseTable):
pk = ToggleColumn()
name = tables.Column(
linkify=True
)
as_attachment = BooleanColumn()
class Meta(BaseTable.Meta):
model = ExportTemplate
fields = (
'pk', 'name', 'content_type', 'description', 'mime_type', 'file_extension', 'as_attachment',
)
default_columns = (
'pk', 'name', 'content_type', 'description', 'mime_type', 'file_extension', 'as_attachment',
)
#
# Tags
#