فهرست منبع

Avoid wrapping text in hierarchical table columns

Jeremy Stretch 5 سال پیش
والد
کامیت
7873952e7a
4فایلهای تغییر یافته به همراه7 افزوده شده و 4 حذف شده
  1. 2 1
      netbox/dcim/tables/racks.py
  2. 2 1
      netbox/dcim/tables/sites.py
  3. 1 1
      netbox/ipam/tables.py
  4. 2 1
      netbox/tenancy/tables.py

+ 2 - 1
netbox/dcim/tables/racks.py

@@ -26,7 +26,8 @@ class RackGroupTable(BaseTable):
     pk = ToggleColumn()
     name = tables.TemplateColumn(
         template_code=MPTT_LINK,
-        orderable=False
+        orderable=False,
+        attrs={'td': {'class': 'text-nowrap'}}
     )
     site = tables.LinkColumn(
         viewname='dcim:site',

+ 2 - 1
netbox/dcim/tables/sites.py

@@ -19,7 +19,8 @@ class RegionTable(BaseTable):
     pk = ToggleColumn()
     name = tables.TemplateColumn(
         template_code=MPTT_LINK,
-        orderable=False
+        orderable=False,
+        attrs={'td': {'class': 'text-nowrap'}}
     )
     site_count = tables.Column(
         verbose_name='Sites'

+ 1 - 1
netbox/ipam/tables.py

@@ -270,7 +270,7 @@ class PrefixTable(BaseTable):
     pk = ToggleColumn()
     prefix = tables.TemplateColumn(
         template_code=PREFIX_LINK,
-        attrs={'th': {'style': 'padding-left: 17px'}}
+        attrs={'td': {'class': 'text-nowrap'}}
     )
     status = ChoiceFieldColumn(
         default=AVAILABLE_LABEL

+ 2 - 1
netbox/tenancy/tables.py

@@ -27,7 +27,8 @@ class TenantGroupTable(BaseTable):
     pk = ToggleColumn()
     name = tables.TemplateColumn(
         template_code=MPTT_LINK,
-        orderable=False
+        orderable=False,
+        attrs={'td': {'class': 'text-nowrap'}}
     )
     tenant_count = LinkedCountColumn(
         viewname='tenancy:tenant_list',