1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

44 lines
1.5 KiB
HTML
Raw Normal View History

2018-10-29 13:09:23 -04:00
<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 %}
<td class="pk">
<input name="pk" type="checkbox" value="{{ rearport.pk }}" />
</td>
{% endif %}
{# 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 }}
</td>
{# Type #}
<td>{{ rearport.get_type_display }}</td>
{# Positions #}
<td>{{ rearport.positions }}</td>
{# 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>