{% load kegweblib %}

<div class="row clickable" id="session-snapshot-{{session.id}}"
    data-href="{{session.get_absolute_url}}">
<div class="span8">

<h3>{{ session.GetTitle }}</h3>

{% with session.GetStats as stats %}

{% with session.OtherPictures as pictures %}
{% if pictures %}
<div class="row-fluid">
  <div class="span3 offset1">
    {% gallery session.HighlightPicture "span12" gallery_id=session.id %}
  </div>
  <div class="span8">
    <div class="row-fluid">
      <div class="span12">
        {% include "kegweb/session-badges.html" %}
      </div>
    </div>
    <div class="row-fluid">
      <div class="span12">
        {% gallery pictures|slice:":5" "span2" gallery_id=session.id %}
      </div>
    </div>
  </div>
</div>
{% else %}
<div class="row-fluid">
  <div class="span11 offset1">
    {% include "kegweb/session-badges.html" %}
  </div>
</div>
{% endif %}
{% endwith %}

<div class="row-fluid">
  <div class="span11 offset1">
    <p>
      <i class="icon-time"></i>
      <a href="{{ session.get_absolute_url }}">{{ session.start_time|date:"M j Y, P" }}</a>
      &middot;
      <i class="icon-user"></i> {{ session.summarize_drinkers|safe }}
    </p>
  </div>
</div>

</div> <!-- /outer span -->
</div> <!-- /outer row -->

{% endwith %} <!-- getstats -->
