{% comment %}
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
{% endcomment %}
{% extends "admin/base_site.html" %}
{% load proto_tags %}
{% block extrahead %}
   <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/racks.css" media="all" />
   <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
   <script type="text/javascript" src="{{ STATIC_URL }}js/racks.js"></script>
{% endblock %}

{% block content %}

{% for rack in racks %}
<div style="float:left;">
<h2>{{ rack.nome }} ({{ rack.vazio }} ocupado)</h2>
<table class="tabela" cellpadding="0" cellspacing="0">
   <tr>
     <td width="2px" style="background-color:#f00;"></td>
     <td width="140px">
       <table style="width:100%; margin:0; padding:0;">
  {% for eq in rack.equipamentos %}
       <tr>
    <td style="background-color:#{% if eq.descricao %}000;" rel="tooltip" title="{{ eq.descricao }}"{% else %}fff;"{% endif %} height="{% widthratio eq.tamanho 1 5 %}px" width="100%"></td>
    </tr>
  {% endfor %}
       </table>
    </td>
   <td width="2px" style="background-color:#f00;"></td>
   </tr>
</table>
</div>
{% if forloop.counter|divisibleby:"5" %}
<div style="clear:both;"></div>
{% endif %}
{% endfor %}
{% endblock %}

