From 251db013fda4a61dae7d8a8ef6f53d48f1a54f89 Mon Sep 17 00:00:00 2001 From: Sebastian Spaeth Date: Tue, 13 Nov 2012 11:35:28 +0100 Subject: [PATCH] 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. --- mediagoblin/templates/mediagoblin/root.html | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/mediagoblin/templates/mediagoblin/root.html b/mediagoblin/templates/mediagoblin/root.html index 5c6eb52f..529d89ef 100644 --- a/mediagoblin/templates/mediagoblin/root.html +++ b/mediagoblin/templates/mediagoblin/root.html @@ -19,6 +19,13 @@ {% 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') -%} + +{%- endblock mediagoblin_head %} + {% block mediagoblin_content %} {% if request.user %}

{% trans %}Explore{% endtrans %}

@@ -39,4 +46,8 @@ {% endif %}

{% trans %}Most recent media{% endtrans %}

{{ 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 %} -- 2.25.1