<tr{% if po.connected_port and not po.connected_port.connection_status %} class="info"{% endif %}>
    <td>
        <i class="fa fa-fw fa-bolt"></i> {{ po.name }}
    </td>
    {% if po.connected_port %}
        <td>
            <a href="{% url 'dcim:device' pk=po.connected_port.device.pk %}">{{ po.connected_port.device }}</a>
        </td>
        <td>
            {{ po.connected_port.name }}
        </td>
    {% else %}
        <td colspan="2">Not connected</td>
    {% endif %}
    <td class="text-right">
        {% if perms.dcim.change_poweroutlet %}
            {% if po.connected_port %}
                {% if po.connected_port.connection_status %}
                    <a href="#" class="btn btn-warning btn-xs powerport-toggle connected" data="{{ po.connected_port.pk }}">
                        <i class="glyphicon glyphicon-ban-circle" aria-hidden="true" title="Mark planned"></i>
                    </a>
                {% else %}
                    <a href="#" class="btn btn-success btn-xs consoleport-toggle" data="{{ po.connected_port.pk }}">
                        <i class="fa fa-plug" aria-hidden="true" title="Mark connected"></i>
                    </a>
                {% endif %}
                <a href="{% url 'dcim:poweroutlet_disconnect' pk=po.pk %}" class="btn btn-danger btn-xs">
                    <i class="glyphicon glyphicon-remove" aria-hidden="true" title="Delete connection"></i>
                </a>
            {% else %}
                <a href="{% url 'dcim:poweroutlet_connect' pk=po.pk %}" class="btn btn-success btn-xs">
                    <i class="glyphicon glyphicon-plus" aria-hidden="true" title="Connect"></i>
                </a>
            {% endif %}
            <a href="{% url 'dcim:poweroutlet_edit' pk=po.pk %}" class="btn btn-info btn-xs">
                <i class="glyphicon glyphicon-pencil" aria-hidden="true" title="Edit outlet"></i>
            </a>
        {% endif %}
        {% if perms.dcim.delete_poweroutlet %}
            {% if po.connected_port %}
                <button class="btn btn-danger btn-xs" disabled="disabled">
                    <i class="glyphicon glyphicon-trash" aria-hidden="true"></i>
                </button>
            {% else %}
                <a href="{% url 'dcim:poweroutlet_delete' pk=po.pk %}" class="btn btn-danger btn-xs">
                    <i class="glyphicon glyphicon-trash" aria-hidden="true" title="Delete outlet"></i>
                </a>
            {% endif %}
        {% endif %}
    </td>
</tr>
