{% extends "happenings/event_detail.html" %}
{% load typogrify_tags markup %}

{% block title %}{{ object.name }} Attendees: {% endblock %}

{% block content %}
  {% csrf_token %}
  <h1>Who you might see at {{ object.name|typogrify }}</h1>
  <ul class="columned four-col">
    {% for u in object.attending.all %}
      <li>
        <h4>
          <a href="{{ u.get_absolute_url }}">
            <img src="/media/{{ u.avatar }}" class="avatar" alt="" />
            {{ u.display_name }}
          </a>
        </h4>
        <p>
          {% if u.first_name and u.last_name %}
            {{ u.first_name }} {{ u.last_name }}<br>
          {% endif %}
          <span class="note">{{ u.city }}{% if u.state %}, {{ u.state }}{% endif %}</span>
        </p>
      </li>
    {% endfor %}
  </ul>
{% endblock %}

{% block aside %}
  <p>
    We're all very important people, right? 
    Here's some of the folks from around the site you might run into at 
    {{ object.name|typogrify }}.
  </p>
  {% if authenticated_request %}
    <h3>
      <a href="{% url 'attending_add' object.slug %}" class="attend add button">
        Add me to the list
      </a>
    </h3>
  {% endif %}
  {{ block.super }}
{% endblock %}
  