{% extends 'base.html' %}
{% load helpers %}
{% load static %}

{% block content %}
<div class="btn-group pull-right noprint" role="group">
    <button class="btn btn-default toggle-images" selected="selected">
        <span class="glyphicon glyphicon-check" aria-hidden="true"></span> Show Images
    </button>
    <a href="{% url 'dcim:rack_elevation_list' %}{% querystring request face='front' %}" class="btn btn-default{% if rack_face == 'front' %} active{% endif %}">Front</a>
    <a href="{% url 'dcim:rack_elevation_list' %}{% querystring request face='rear' %}" class="btn btn-default{% if rack_face == 'rear' %} active{% endif %}">Rear</a>
</div>
<h1>{% block title %}Rack Elevations{% endblock %}</h1>
<div class="row">
    {% if page %}
        <div class="col-md-9">
            <div style="white-space: nowrap; overflow-x: scroll;">
                {% for rack in page %}
                    <div style="display: inline-block; width: 266px">
                        {% include 'dcim/inc/rack_elevation_header.html' %}
                        {% include 'dcim/inc/rack_elevation.html' with face=rack_face %}
                        <div class="clearfix"></div>
                        {% include 'dcim/inc/rack_elevation_header.html' %}
                    </div>
                {% endfor %}
            </div>
            <br />
            {% include 'inc/paginator.html' %}
        </div>
    {% else %}
        <div class="col-md-9">
            <p>No racks found</p>
        </div>
    {% endif %}
    <div class="col-md-3 noprint">
		{% include 'inc/search_panel.html' %}
    </div>
</div>
{% endblock %}

{% block javascript %}
<script src="{% static 'js/rack_elevations.js' %}?v{{ settings.VERSION }}"></script>
{% endblock %}
