{% extends 'dcim/devicetype/base.html' %}
{% load buttons %}
{% load helpers %}
{% load plugins %}

{% block content %}
    <div class="row">
        <div class="col col-md-6">
            <div class="card">
                <h5 class="card-header">
                    Chassis
                </h5>
                <div class="card-body">
                    <table class="table table-hover attr-table">
                        <tr>
                            <td>Manufacturer</td>
                            <td>{{ object.manufacturer|linkify }}</td>
                        </tr>
                        <tr>
                            <td>Model Name</td>
                            <td>
                                {{ object.model }}<br/>
                                <small class="text-muted">{{ object.slug }}</small>
                            </td>
                        </tr>
                        <tr>
                            <td>Part Number</td>
                            <td>{{ object.part_number|placeholder }}</td>
                        </tr>
                        <tr>
                            <td>Default Platform</td>
                            <td>{{ object.default_platform|linkify }}</td>
                        </tr>
                        <tr>
                            <td>Description</td>
                            <td>{{ object.description|placeholder }}</td>
                        </tr>
                        <tr>
                            <td>Height (U)</td>
                            <td>{{ object.u_height|floatformat }}</td>
                        </tr>
                        <tr>
                            <td>Full Depth</td>
                            <td>{% checkmark object.is_full_depth %}</td>
                        </tr>
                        <tr>
                            <td>Weight</td>
                            <td>
                            {% if object.weight %}
                              {{ object.weight|floatformat }} {{ object.get_weight_unit_display }}
                            {% else %}
                              {{ ''|placeholder }}
                            {% endif %}
                            </td>
                        </tr>
                        <tr>
                            <td>Parent/Child</td>
                            <td>
                                {{ object.get_subdevice_role_display|placeholder }}
                            </td>
                        </tr>
                        <tr>
                            <td>Airflow</td>
                            <td>
                                {{ object.get_airflow_display|placeholder }}
                            </td>
                        </tr>
                        <tr>
                            <td>Front Image</td>
                            <td>
                                {% if object.front_image %}
                                    <a href="{{ object.front_image.url }}">
                                        <img src="{{ object.front_image.url }}" alt="{{ object.front_image.name }}" class="img-fluid" />
                                    </a>
                                {% else %}
                                    {{ ''|placeholder }}
                                {% endif %}
                            </td>
                        </tr>
                        <tr>
                            <td>Rear Image</td>
                            <td>
                                {% if object.rear_image %}
                                    <a href="{{ object.rear_image.url }}">
                                        <img src="{{ object.rear_image.url }}" alt="{{ object.rear_image.name }}" class="img-fluid" />
                                    </a>
                                {% else %}
                                    {{ ''|placeholder }}
                                {% endif %}
                            </td>
                        </tr>
                    </table>
                </div>
            </div>
            {% include 'inc/panels/tags.html' %}
            {% plugin_left_page object %}
        </div>
        <div class="col col-md-6">
            {% include 'inc/panels/related_objects.html' %}
            {% include 'inc/panels/custom_fields.html' %}
            {% include 'inc/panels/comments.html' %}
            {% include 'inc/panels/image_attachments.html' %}
            {% plugin_right_page object %}
        </div>
    </div>
    <div class="row">
        <div class="col col-md-12">
            {% plugin_full_width_page object %}
        </div>
    </div>
{% endblock %}
