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

{% block content %}
    <div class="row">
        <div class="col col-md-6">
            <div class="card">
                <h2 class="card-header">{% trans "Chassis" %}</h2>
                <table class="table table-hover attr-table">
                    <tr>
                        <th scope="row">{% trans "Manufacturer" %}</th>
                        <td>{{ object.manufacturer|linkify }}</td>
                    </tr>
                    <tr>
                        <th scope="row">{% trans "Model Name" %}</th>
                        <td>
                            {{ object.model }}<br/>
                            <small class="text-muted">{{ object.slug }}</small>
                        </td>
                    </tr>
                    <tr>
                        <th scope="row">{% trans "Part Number" %}</th>
                        <td>{{ object.part_number|placeholder }}</td>
                    </tr>
                    <tr>
                        <th scope="row">{% trans "Default Platform" %}</th>
                        <td>{{ object.default_platform|linkify }}</td>
                    </tr>
                    <tr>
                        <th scope="row">{% trans "Description" %}</th>
                        <td>{{ object.description|placeholder }}</td>
                    </tr>
                    <tr>
                        <th scope="row">{% trans "Height (U)" %}</th>
                        <td>{{ object.u_height|floatformat }}</td>
                    </tr>
                    <tr>
                        <th scope="row">{% trans "Exclude From Utilization" %}</th>
                        <td>{% checkmark object.exclude_from_utilization %}</td>
                    </tr>
                    <tr>
                        <th scope="row">{% trans "Full Depth" %}</th>
                        <td>{% checkmark object.is_full_depth %}</td>
                    </tr>
                    <tr>
                        <th scope="row">{% trans "Weight" %}</th>
                        <td>
                        {% if object.weight %}
                          {{ object.weight|floatformat }} {{ object.get_weight_unit_display }}
                        {% else %}
                          {{ ''|placeholder }}
                        {% endif %}
                        </td>
                    </tr>
                    <tr>
                        <th scope="row">{% trans "Parent/Child" %}</th>
                        <td>
                            {{ object.get_subdevice_role_display|placeholder }}
                        </td>
                    </tr>
                    <tr>
                        <th scope="row">{% trans "Airflow" %}</th>
                        <td>
                            {{ object.get_airflow_display|placeholder }}
                        </td>
                    </tr>
                    <tr>
                        <th scope="row">{% trans "Front Image" %}</th>
                        <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>
                        <th scope="row">{% trans "Rear Image" %}</th>
                        <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>
            {% 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 %}
