{% extends "base.html" %}
{% load kegweblib %}

{% block title %}Drink {{ drink.id }} by {{ drink.user.username }} | {{ block.super }}{% endblock %}
{% block pagetitle %}Drink {{ drink.id }} by {{ drink.user.username }}{% endblock %}

{% block content %}
<div class="row-fluid">

<div class="span6">

<table class="table table-striped">
<tbody>
  <tr>
    <th>Size</th>
    <td>
      {% volume drink.volume_ml %}
      {% if drink.duration %}
      <span class="muted">
       (took {{drink.duration}} second{{drink.duration|pluralize}} to pour)
      </span>
      {% endif %}
    </td>
  </tr>

  <tr>
    <th>When</th>
    <td>
       {% timeago drink.time %}
    </td>
  </tr>

  {% if drink.keg %}
  <tr>
    <th>Keg</th>
    <td>
      <a href="{% url "kb-keg" drink.keg.id %}">{{drink.keg.type.name}}</a>
    </td>
  </tr>
  {% endif %}

  <tr>
    <th>Session</th>
    <td>
       <a href="{{ drink.session.get_absolute_url }}">{{ drink.session.GetTitle }}</a>
       <span class="muted">({{ drink.session.summarize_drinkers|safe }})</span>
    </td>
  </tr>

  <tr>
    <th>Permalink</th>
    <td>
       <a href="{{ drink.ShortUrl }}">{{ drink.ShortUrl }}</a>
    </td>
  </tr>

  </tbody>
</table>
</div>

{% with drink.pictures.all as pictures %}
{% if pictures.count %}
<div class="span6">
  <img src="{{pictures.0.picture.resized.url}}">
</div>
{% endif %}
{% endwith %}


</div> <!-- /row-fluid -->

{% endblock content %}
