mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
45 lines
1.6 KiB
HTML
45 lines
1.6 KiB
HTML
<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 %}
|
|
<td class="pk">
|
|
<input name="pk" type="checkbox" value="{{ frontport.pk }}" />
|
|
</td>
|
|
{% endif %}
|
|
|
|
{# Name #}
|
|
<td>
|
|
<i class="fa fa-fw fa-square{% if not frontport.cable %}-o{% endif %}"></i> {{ frontport }}
|
|
</td>
|
|
|
|
{# Type #}
|
|
<td>{{ frontport.get_type_display }}</td>
|
|
|
|
{# Rear port #}
|
|
<td>{{ frontport.rear_port }}</td>
|
|
<td>{{ frontport.rear_port_position }}</td>
|
|
|
|
{# Cable #}
|
|
<td>
|
|
{% if frontport.cable %}
|
|
<a href="{{ frontport.cable.get_absolute_url }}">{{ frontport.cable }}</a>
|
|
{% else %}
|
|
<span class="text-muted">Not connected</span>
|
|
{% endif %}
|
|
</td>
|
|
|
|
{# Actions #}
|
|
<td class="text-right">
|
|
{% if perms.dcim.change_frontport %}
|
|
<a href="{% url 'dcim:frontport_edit' pk=frontport.pk %}?return_url={{ device.get_absolute_url }}" title="Edit port" class="btn btn-info btn-xs">
|
|
<i class="glyphicon glyphicon-pencil" aria-hidden="true"></i>
|
|
</a>
|
|
{% endif %}
|
|
{% if perms.dcim.delete_frontport %}
|
|
<a href="{% url 'dcim:frontport_delete' pk=frontport.pk %}?return_url={{ device.get_absolute_url }}" title="Delete port" class="btn btn-danger btn-xs">
|
|
<i class="glyphicon glyphicon-trash" aria-hidden="true"></i>
|
|
</a>
|
|
{% endif %}
|
|
</td>
|
|
</tr>
|