2018-10-29 13:09:23 -04:00
|
|
|
<tr class="rearport{% if rearport.cable %} {% if rearport.cable.status %}success{% else %}info{% endif %}{% endif %}">
|
2018-10-26 11:29:03 -04:00
|
|
|
|
2018-10-29 12:56:17 -04:00
|
|
|
{# Checkbox #}
|
|
|
|
{% if perms.dcim.change_rearport or perms.dcim.delete_rearport %}
|
|
|
|
<td class="pk">
|
|
|
|
<input name="pk" type="checkbox" value="{{ rearport.pk }}" />
|
2018-10-25 12:08:13 -04:00
|
|
|
</td>
|
2018-10-29 12:56:17 -04:00
|
|
|
{% endif %}
|
2018-10-26 11:29:03 -04:00
|
|
|
|
2018-10-29 12:56:17 -04:00
|
|
|
{# Name #}
|
|
|
|
<td>
|
2018-10-29 13:09:23 -04:00
|
|
|
<i class="fa fa-fw fa-square{% if not rearport.cable %}-o{% endif %}"></i> {{ rearport }}
|
2018-10-29 12:56:17 -04:00
|
|
|
</td>
|
2018-10-26 11:29:03 -04:00
|
|
|
|
2018-10-29 12:56:17 -04:00
|
|
|
{# Type #}
|
|
|
|
<td>{{ rearport.get_type_display }}</td>
|
2018-10-26 11:29:03 -04:00
|
|
|
|
2018-10-29 12:56:17 -04:00
|
|
|
{# Positions #}
|
|
|
|
<td>{{ rearport.positions }}</td>
|
2018-10-26 11:29:03 -04:00
|
|
|
|
2018-10-29 12:56:17 -04:00
|
|
|
{# Cable #}
|
|
|
|
<td>
|
|
|
|
{% if rearport.cable %}
|
|
|
|
<a href="{{ rearport.cable.get_absolute_url }}">{{ rearport.cable }}</a>
|
|
|
|
{% else %}
|
|
|
|
<span class="text-muted">Not connected</span>
|
|
|
|
{% endif %}
|
|
|
|
</td>
|
|
|
|
|
|
|
|
{# Actions #}
|
|
|
|
<td class="text-right">
|
|
|
|
{% if perms.dcim.change_rearport %}
|
|
|
|
<a href="{% url 'dcim:rearport_edit' pk=rearport.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_rearport %}
|
|
|
|
<a href="{% url 'dcim:rearport_delete' pk=rearport.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>
|