{% extends "page-twocol.html" %} {% load kegweblib %} {% block title %}Keg {{ keg.id }} | {{ block.super }}{% endblock %} {% block pagetitle %}Keg {{ keg.id }}{% endblock %} {% block sidebar %}
{% include "kegweb/keg-image.html" %} {% with keg.next as next %} {% with keg.previous as previous %} {% if next or previous %}
{% if previous %} « previous keg {% endif %} {% if next and previous %} — {% endif %} {% if next %} next keg » {% endif %}
{% endif %} {% endwith %} {% endwith %}
{% endblock sidebar %} {% block col-1 %}

{{keg.type.name}} {% if keg.type.brewer %} {{keg.type.brewer}} {% if user.is_staff %} (edit beer) {% endif %} {% endif %}

{% include "kegweb/basic-badges.html" %} {% include "kegweb/basic-stats.html" %} {% with keg.current_tap as tap %} {% if tap and tap.temperature_sensor %} {% endif %} {% endwith %} {% if keg.spilled_volume > 0 %} {% endif %}
Status {% if keg.online %} Keg is online, and is {{ keg.keg_age.days }} day{{keg.keg_age.days|pluralize}} old. {% if keg.is_empty %} (empty) {% else %} ({{ keg.percent_full|floatformat:2 }}% full) {% endif %} {% else %} Keg is offline; it lasted {{ keg.keg_age.days }} day{{keg.keg_age.days|pluralize}}. {% endif %}
Temperature {{ tap.Temperature.TempC|floatformat:1}}°C / {{ tap.Temperature.TempF|floatformat:1}}°F
{% chart sensor tap.temperature_sensor 340 60 %}
Total Spilled/Lost {% volume keg.spilled_volume %}
{% if keg.description %}

{{ keg.description}}

{% endif %}
{% if sessions %} {% for session in sessions %} {% include "kegweb/keg-session.html" %} {% endfor %} {% endif %} {% endblock col-1 %} {% block col-2 %}

Top Drinkers

{% chart users_by_volume stats 280 220 %}
{% with keg.TopDrinkers as ranked_drinkers %} {% include "kegweb/drinker-rank.html" %} {% endwith %}
{% endblock col-2 %}