{% extends "podcasts/base.html" %}{% load molly_utils %}{% load molly_external_media %}
{% load i18n %}
{% block breadcrumbs %}
{{ block.super }}
            <li><a href="{% url podcasts:index %}">
                <img src="{{ STATIC_URL }}images/index-icons/podcasts-bc.png" alt='{% trans "Podcasts" %}'/>
            </a></li>
{% if podcast.category %}
    <li><a href="{{ podcast.category.get_absolute_url }}">...</a></li>
{% endif %}
{% endblock %}

{% block pagetitle %}{% trans "Podcast" %}{% endblock %}
{% block title %}{{ podcast.title }}{% endblock %}


{% block extrahead %}
<link href="{{ podcast.rss_url }}" type="application/rss+xml" rel="alternate" title="Podcast RSS feed" />
{% endblock %}

{% comment %}
	blocklist
	
	content
	    after_encurl - defines any extra parameters after each enclosure URL 
{% endcomment %}
{% block content %}

<div class="section">
  <div class="header">
    {% if podcast.logo %}
    {% with device|device_has_parent:"apple_iphone_ver4"|yesno:"120,60" as max_width %}
    <img class="podcasts-icon" src="{% external_image podcast.logo max_width %}" width="60" height="60" alt=""/>
    {% endwith %}
    {% endif %}
    <h2>{{ podcast.title }}</h2>
    
    <div class="podcast-description">
    {{ podcast.description|safe }}
    </div>
    <div class="clear"> </div>
  </div>
<ul class="content-list">
{% for item in items %}
    
    <li>
    <h3>{{ item.title }}</h3>
    {% if item.license_data %}
    <a class="podcasts-license" href="{{ item.license }}">
      <img src="{{ item.license_data.logo }}" alt="{{ item.license_data }}"/>
    </a>
    {% endif %}
      
      <small>
        {# Significant whitespace on next line #}
        {% trans "Published:" %} {{ item.published_date|date:"DATE_FORMAT" }}
      </small><br />
    <div class="podcast-description">
      {{ item.description|safe }}
    </div>
    
    <ul class="link-list stand-alone podcast-enclosures">
    {% for enc in item.podcastenclosure_set.all %}
      <li class="podcast-enclosure">
        <a href="{{ enc.url }}{% block after_encurl %}{% endblock %}">
        <img src="{{ STATIC_URL }}site/images/icons/list-{{ enc.medium }}.png" alt="({{ enc.medium }})"/>
          {% if item.duration %}{{ item.duration|humanise_seconds }}, {% endif %}{{ enc.get_mimetype_display|capfirst }}, {{ enc.length|filesizeformat }}
          </a>
        </li>
    {% endfor %}
      </ul>
    </li>


{% endfor %}
</ul>
</div>

{% endblock %}
