Просмотр исходного кода

Fix front/rear port connection styling

Jeremy Stretch 7 лет назад
Родитель
Сommit
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 #}
     {# Checkbox #}
     {% if perms.dcim.change_frontport or perms.dcim.delete_frontport %}
     {% if perms.dcim.change_frontport or perms.dcim.delete_frontport %}
@@ -9,7 +9,7 @@
 
 
     {# Name #}
     {# Name #}
     <td>
     <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>
     </td>
 
 
     {# Type #}
     {# 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 #}
     {# Checkbox #}
     {% if perms.dcim.change_rearport or perms.dcim.delete_rearport %}
     {% if perms.dcim.change_rearport or perms.dcim.delete_rearport %}
@@ -9,7 +9,7 @@
 
 
     {# Name #}
     {# Name #}
     <td>
     <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>
     </td>
 
 
     {# Type #}
     {# Type #}