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

Linkify components under device view

Jeremy Stretch 5 лет назад
Родитель
Сommit
0fcdd63941

+ 2 - 1
netbox/templates/dcim/inc/consoleport.html

@@ -2,7 +2,8 @@
 
     {# Name #}
     <td>
-        <i class="fa fa-fw fa-keyboard-o"></i> {{ cp }}
+        <i class="fa fa-fw fa-keyboard-o"></i>
+        <a href="{{ cp.get_absolute_url }}">{{ cp }}</a>
     </td>
 
     {# Type #}

+ 2 - 1
netbox/templates/dcim/inc/consoleserverport.html

@@ -11,7 +11,8 @@
 
     {# Name #}
     <td>
-        <i class="fa fa-fw fa-keyboard-o"></i> {{ csp }}
+        <i class="fa fa-fw fa-keyboard-o"></i>
+        <a href="{{ csp.get_absolute_url }}">{{ csp }}</a>
     </td>
 
     {# Type #}

+ 2 - 1
netbox/templates/dcim/inc/devicebay.html

@@ -9,7 +9,8 @@
 
     {# Name #}
     <td>
-        <i class="fa fa-fw fa-{% if devicebay.installed_device %}dot-circle-o{% else %}circle-o{% endif %}"></i> {{ devicebay.name }}
+        <i class="fa fa-fw fa-{% if devicebay.installed_device %}dot-circle-o{% else %}circle-o{% endif %}"></i>
+        <a href="{{ devicebay.get_absolute_url }}">{{ devicebay.name }}</a>
     </td>
 
     {# Status #}

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

@@ -10,7 +10,8 @@
 
     {# Name #}
     <td>
-        <i class="fa fa-fw fa-square{% if not frontport.cable %}-o{% endif %}"></i> {{ frontport }}
+        <i class="fa fa-fw fa-square{% if not frontport.cable %}-o{% endif %}"></i>
+        <a href="{{ frontport.get_absolute_url }}">{{ frontport }}</a>
     </td>
 
     {# Type #}

+ 2 - 1
netbox/templates/dcim/inc/poweroutlet.html

@@ -11,7 +11,8 @@
 
     {# Name #}
     <td>
-        <i class="fa fa-fw fa-bolt"></i> {{ po }}
+        <i class="fa fa-fw fa-bolt"></i>
+        <a href="{{ po.get_absolute_url }}">{{ po }}</a>
     </td>
 
     {# Type #}

+ 2 - 1
netbox/templates/dcim/inc/powerport.html

@@ -2,7 +2,8 @@
 
     {# Name #}
     <td>
-        <i class="fa fa-fw fa-bolt"></i> {{ pp }}
+        <i class="fa fa-fw fa-bolt"></i>
+        <a href="{{ pp.get_absolute_url }}">{{ pp }}</a>
     </td>
 
     {# Type #}

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

@@ -10,7 +10,8 @@
 
     {# Name #}
     <td>
-        <i class="fa fa-fw fa-square{% if not rearport.cable %}-o{% endif %}"></i> {{ rearport }}
+        <i class="fa fa-fw fa-square{% if not rearport.cable %}-o{% endif %}"></i>
+        <a href="{{ rearport.get_absolute_url }}">{{ rearport }}</a>
     </td>
 
     {# Type #}