瀏覽代碼

Fix front/rear port connection styling

Jeremy Stretch 7 年之前
父節點
當前提交
1ab4344537
共有 2 個文件被更改,包括 4 次插入4 次删除
  1. 2 2
      netbox/templates/dcim/inc/frontport.html
  2. 2 2
      netbox/templates/dcim/inc/rearport.html

+ 2 - 2
netbox/templates/dcim/inc/frontport.html

@@ -1,4 +1,4 @@
-<tr class="frontport{% if cable %} {% if cable.status %}success{% else %}info{% endif %}{% endif %}">
+<tr class="frontport{% if frontport.cable %} {% if frontport.cable.status %}success{% else %}info{% endif %}{% endif %}">
 
     {# Checkbox #}
     {% if perms.dcim.change_frontport or perms.dcim.delete_frontport %}
@@ -9,7 +9,7 @@
 
     {# Name #}
     <td>
-        <i class="fa fa-fw fa-square{% if not cable %}-o{% endif %}"></i> {{ frontport }}
+        <i class="fa fa-fw fa-square{% if not frontport.cable %}-o{% endif %}"></i> {{ frontport }}
     </td>
 
     {# Type #}

+ 2 - 2
netbox/templates/dcim/inc/rearport.html

@@ -1,4 +1,4 @@
-<tr class="rearport{% if cable %} {% if cable.status %}success{% else %}info{% endif %}{% endif %}">
+<tr class="rearport{% if rearport.cable %} {% if rearport.cable.status %}success{% else %}info{% endif %}{% endif %}">
 
     {# Checkbox #}
     {% if perms.dcim.change_rearport or perms.dcim.delete_rearport %}
@@ -9,7 +9,7 @@
 
     {# Name #}
     <td>
-        <i class="fa fa-fw fa-square{% if not cable %}-o{% endif %}"></i> {{ rearport }}
+        <i class="fa fa-fw fa-square{% if not rearport.cable %}-o{% endif %}"></i> {{ rearport }}
     </td>
 
     {# Type #}