Source

christchurch_django / sermons / templates / sermons / index.html

Diff from to

sermons/templates/sermons/index.html

 {% paginate %}
 
 {% for sermon in sermons %}
-  {% ifchanged sermon.date_delivered %}
-  <h2>{{ sermon.date_delivered|date:"F j, Y" }}</h2>
+  {% ifchanged sermon.date_delivered|date:"FY" %}
+  <h2>{{ sermon.date_delivered|date:"F Y" }}</h2>
   {% endifchanged %}
-  <p>{{ sermon.nice_time }}: <a href="{{ sermon.sermon.url }}">{{ sermon.speaker }} {% if sermon.title %} - {{ sermon.title }}{% endif %}{% if sermon.nice_passage %} - {{ sermon.nice_passage }}{% endif %}</a></p>
+  <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 %}