{% extends "feeds/events/base.html" %}{% load molly_maps %}
{% load i18n %}{% load molly_utils %}
{% block breadcrumbs %}
{{ block.super }}
            <li><a href="{% url events:index %}">
                <img src="{{ STATIC_URL }}images/index-icons/rss-bc.png" alt='{% trans "Events" %}'/>
            </a></li>
            <li><a href="{% url events:item-list item.feed.slug %}">
                &hellip;
            </a></li>
{% endblock %}

{% block pagetitle %}{% trans "Event" %}{% endblock %}
{# Significant whitespace on line below #}
{% block title %}{% trans "Event" %}: {{ item.title }}{% endblock %}

{% block content %}

<div class="section">
    <h2>{{ item.title }}</h2>
    
    <div class="article"><div class="bubble pad-5">
        {% if description %}   
        {{ description|safe|urlize|linebreaksbr }}
        <br /><br />
        {% endif %}

        {% if item.dt_start %}
        {% trans "Starts:" %}
            {% if item.dt_start|date:"H:i" != "00:00" %}
            {{item.dt_start|date:"l j M Y \a\t H:i"}}<br />
            {% else %}
            {{item.dt_start|date:"l j M Y"}}<br />
            {% endif %}
        {% endif %}

        {% if item.dt_end %}
        {% trans "Ends:" %} 
            {% if item.dt_end|date:"H:i" != "00:00" %}
            {{item.dt_end|date:"l j M Y \a\t H:i"}}<br />
            {% else %}
            {{item.dt_end|date:"l j M Y"}}<br />
            {% endif %}
        {% endif %}

        <small><em>
            {# Do not display the "last modified" date if we have dt_start  #}
            {% if not item.dt_start %}
            {{ item.last_modified_local|date:"j M Y \a\t H:i" }}<br />
            {% endif %}
            {# Significant whitespace on line below #}
            {% if item.link %}
            {% trans "Link:" %} <a href="{{ item.link }}" title="{{ item.title }}">{{ item.link }}</a>
            {% endif %}
        </em></small>
    </div></div>
</div>

{% if item.venue %}
<div class="section">
	<div class="header">
		<h2>{{ item.venue.name }}</h2>
	</div>
	{% if item.venue.address %}
		<div class="pad-5"><div class="note">
			<p>{{ item.venue.address }}</p>
		</div></div>
	{% endif %}
	{% if item.venue.location %}
		{% render_location_map item.venue.location %}
	{% endif %}
	
    <ul class="link-list">
		{% if item.venue.entity %}
			<li>
				<a href="{{ item.venue.entity.get_absolute_url }}">
					{{ item.venue.entity.title }}
				</a>
			</li>
		{% endif %}
		{% if item.venue.telephone %}
			<li>
				<a class="phone" href="{{ item.venue.telephone|telephone_uri }}">
				  {% blocktrans with item.venue.name as title %}Call <em>{{ title }}</em>{% endblocktrans %}
				  <br/>
				  <small>{{ item.venue.telephone|telephone:"nolink" }}</small>
				</a>
			</li>
		{% endif %}
    </ul>
    
</div>
{% endif %}

{% endblock %}
