Integrate all atom feed in template

Embed the atom feed link in the root template (most recent media
page) for easier discovery. Delete the (listings/all.html) template
as contributed in commit 195e79098b5 as it was unused and the feed
is essentially showing the most recent media anyway.
This commit is contained in:
Sebastian Spaeth 2012-11-13 11:35:28 +01:00 committed by Christopher Allan Webber
parent b624ca0f8b
commit 251db013fd

View File

@ -19,6 +19,13 @@
{% from "mediagoblin/utils/object_gallery.html" import object_gallery %} {% from "mediagoblin/utils/object_gallery.html" import object_gallery %}
{% set feed_url = request.urlgen('mediagoblin.listings.atom_feed') %}
{% block mediagoblin_head -%}
{% set feed_url = request.urlgen('mediagoblin.listings.atom_feed') -%}
<link rel="alternate" type="application/atom+xml" href="{{ feed_url }}">
{%- endblock mediagoblin_head %}
{% block mediagoblin_content %} {% block mediagoblin_content %}
{% if request.user %} {% if request.user %}
<h1>{% trans %}Explore{% endtrans %}</h1> <h1>{% trans %}Explore{% endtrans %}</h1>
@ -39,4 +46,8 @@
{% endif %} {% endif %}
<h2>{% trans %}Most recent media{% endtrans %}</h2> <h2>{% trans %}Most recent media{% endtrans %}</h2>
{{ object_gallery(request, media_entries, pagination) }} {{ object_gallery(request, media_entries, pagination) }}
{#- Need to set feed_url within this block so template can use it. -#}
{%- set feed_url = feed_url -%}
{%- include "mediagoblin/utils/feed_link.html" -%}
{% endblock %} {% endblock %}