Browse Source

Changed TenantGroup edit link to a button

Jeremy Stretch 8 years ago
parent
commit
d933d034e0
1 changed files with 4 additions and 4 deletions
  1. 4 4
      netbox/tenancy/tables.py

+ 4 - 4
netbox/tenancy/tables.py

@@ -6,9 +6,9 @@ from utilities.tables import BaseTable, ToggleColumn
 from .models import Tenant, TenantGroup
 
 
-TENANTGROUP_EDIT_LINK = """
+TENANTGROUP_ACTIONS = """
 {% if perms.tenancy.change_tenantgroup %}
-    <a href="{% url 'tenancy:tenantgroup_edit' slug=record.slug %}">Edit</a>
+    <a href="{% url 'tenancy:tenantgroup_edit' slug=record.slug %}" class="btn btn-xs btn-warning"><i class="glyphicon glyphicon-pencil" aria-hidden="true"></i></a>
 {% endif %}
 """
 
@@ -22,11 +22,11 @@ class TenantGroupTable(BaseTable):
     name = tables.LinkColumn(verbose_name='Name')
     tenant_count = tables.Column(verbose_name='Tenants')
     slug = tables.Column(verbose_name='Slug')
-    edit = tables.TemplateColumn(template_code=TENANTGROUP_EDIT_LINK, verbose_name='')
+    actions = tables.TemplateColumn(template_code=TENANTGROUP_ACTIONS, verbose_name='')
 
     class Meta(BaseTable.Meta):
         model = TenantGroup
-        fields = ('pk', 'name', 'tenant_count', 'slug', 'edit')
+        fields = ('pk', 'name', 'tenant_count', 'slug', 'actions')
 
 
 #