{% extends "base_with_margins.html" %}
{% load extras %}
{% load staticfiles %}
{% block title %}{{event.name}}{% endblock %}
{% block content %}

    <div class="row-fluid">
        <div class="col-sm-8">
            <br/>
            <p><a href='/events'>< back to Events</a></p>
            <h1>{{event.name}}</h1>
            <p>{{event.description}}</p>

            <p class="small text-muted">
                <i class="fa fa-fw fa-calendar-o"></i> {{event.start_time | date:"D n/d/Y"}}<br/>
                <i class="fa fa-fw fa-clock-o"></i> {{event.start_time | date:"g:i a"}}<br/>
                <i class="fa fa-fw fa-map-marker"></i> {{event.location_name}}
            </p>

            <p class="small">
                <a href='{{event.source_url}}' title='View the source for this page' target="_blank">
                    <i class='fa fa-fw fa-external-link'></i> 
                    View the source for this page
                </a>
            </p>

            <hr />

            {% if participants %}
            <h4>Participants</h4>
            <p>
                {% for participant in participants %}
                   <i class="fa fa-fw fa-users"></i> {{participant.link_html | safe}}<br />
                {% endfor %}
            </p>
            {% endif %}

            {% if event.clean_agenda_items %}
            <h4>Agenda</h4>
            <p>
                <ol>
                    {% for agenda_item in event.clean_agenda_items %}
                        {{agenda_item}}<br />
                    {% endfor %}
                </ol>
            </p>
            {% endif %}

            {% if event.documents.all %}
            <h4>Attachments</h4>
            <p>
                {% for document in event.documents.all %}
                    <i class='fa fa-fw fa-file-text-o'></i> <a href="{{document.document.url}}">{{document.document.note}}</a><br />
                {% endfor %}
            </p>
            {% endif %}

        </div>
    </div>

{% endblock %}
