{% extends 'base.html' %} {% load resource_filters %} {% block header_button %} New resource pool {% endblock %} {% block main %}
{% for resource_pool in resource_pools.qs %}

{{ resource_pool.name }}

{% if resource_pool.attribute_definitions.all|length == 0 %} {% else %} {% for attribute in resource_pool.attribute_definitions.all %} {% with progress_value=resource_pool.id|get_percent_consumption:attribute.name total_produced=attribute.total_produced total_consumed=attribute.total_consumed %} {% endwith %} {% endfor %}
Attribute Consumption Produced Consumed Available
{{ attribute.name }}
{{ progress_value | floatformat:0 }}%
{{ total_produced | floatformat:0 }} {% if attribute.over_commitment_producers != 1 %} {% endif %} {{ total_consumed | floatformat:0 }} {% if attribute.over_commitment_consumers != 1 %} {% endif %} {{ total_produced|subtract:total_consumed | floatformat:0 }}
{% endif %}
{% endfor %}
{% endblock %}