Source

christchurch_django / sermons / templates / sermons / index.html

Full commit
{% extends "standard.html" %}
{% load pagination_tags %}

{% block title %}Sermons
  {% with title=sermonsfilter.title %}
    {% if title %} - {{ title }}{% endif %}
  {% endwith %}
{% endblock %}

{% block content %}
{{ block.super }}

{% autopaginate sermons 30 %}

{{ sermonsfilter }}

{% paginate %}

{% for sermon in sermons %}
  {% ifchanged sermon.date_delivered|date:"FY" %}
  <h2>{{ sermon.date_delivered|date:"F Y" }}</h2>
  {% endifchanged %}
  <div class="sermon">
    <h3>{% if sermon.title %}{{ sermon.title }}{% if sermon.nice_passage %} - {% endif %}{% endif %}{{ sermon.nice_passage }}</h3>
    <p class="sermondetails"><span class="sermondate">{{ sermon.date_delivered|date:"F j, Y" }}</span>
      | <span class="sermontime">{{ sermon.nice_time }}</span>
      | <span class="speaker">by <a href="?speaker={{ sermon.speaker.id }}">{{ sermon.speaker }}</a></span>
      {% if sermon.series and 'series' not in request.GET %}
      | From series <a href="?series={{ sermon.series.id }}">{{ sermon.series.name }}</a>
      {% endif %}
    </p>
    <p class="sermonactions"><a href="{{ sermon.sermon.url }}"><img src="{{ STATIC_URL }}christchurch/img/audio-icon-small.png" />Listen/download</a></p>
  </div>
{% endfor %}

{% paginate %}
{% endblock %}