{% extends 'base.html' %}
{% load calctags %}
{% block top %}
{% endblock %}

{% block body %}

  <p>{% if demo %} Non sono state inviate mail - modalita' demo attiva {% endif %}</p>
  <table class='table'>
    <thead>
      <tr>
        <th scope='col'>Dominio</th>
	<th scope='col'>Target</th>
        <th scope='col'>Quota</th>
        <th scope='col'>Precedente</th>
        <th scope='col'>Differenza</th>
	<th scope='col'>Extra Target</th>
      </tr>
    </thead>
    <tbody>
      {% csrf_token %}
      {% for d in domini %}
      <tr {% if d|QuotaAlert %} class='bg-warning' {% endif %}>
          <td scope='row'>{{ d.nome }} </td>
	  <td>{{ d.target.nome }}({{ d.target.spazio|Giga }})</td>
          <td>{{ d|SumQuota|Giga }}</td>
	  <td>{{ d|SumLast|Giga }} </td>
	  <td>{{ d|DiffQuota|Giga }}</td>
	  <td>{{ d|QuotaAlert|Giga }}</td>
        </tr>
      {% endfor %}
      </form>
    </tbody>
{% endblock %}


