From 5b21ecf9db4c1618066142b77aaa750d1333a1d7 Mon Sep 17 00:00:00 2001 From: Christopher Allan Webber Date: Thu, 18 Aug 2011 21:28:00 -0500 Subject: [PATCH] Feed link, as an includable template! --- .../templates/mediagoblin/listings/tag.html | 6 +---- .../mediagoblin/user_pages/gallery.html | 6 +---- .../mediagoblin/user_pages/user.html | 6 +---- .../mediagoblin/utils/feed_link.html | 23 +++++++++++++++++++ 4 files changed, 26 insertions(+), 15 deletions(-) create mode 100644 mediagoblin/templates/mediagoblin/utils/feed_link.html diff --git a/mediagoblin/templates/mediagoblin/listings/tag.html b/mediagoblin/templates/mediagoblin/listings/tag.html index bf2b4c01..289f44b8 100644 --- a/mediagoblin/templates/mediagoblin/listings/tag.html +++ b/mediagoblin/templates/mediagoblin/listings/tag.html @@ -39,10 +39,6 @@ {% set feed_url = request.urlgen( 'mediagoblin.listings.tag_atom_feed', tag=tag_slug) %} - - {% trans %}feed icon{% endtrans %} />
-    </a>
-    <a href={%- trans %}Atom feed{% endtrans -%} + {% include "mediagoblin/utils/feed_link.html" %} {% endblock %} diff --git a/mediagoblin/templates/mediagoblin/user_pages/gallery.html b/mediagoblin/templates/mediagoblin/user_pages/gallery.html index e54422da..3a3d2373 100644 --- a/mediagoblin/templates/mediagoblin/user_pages/gallery.html +++ b/mediagoblin/templates/mediagoblin/user_pages/gallery.html @@ -45,11 +45,7 @@ {% set feed_url = request.urlgen( 'mediagoblin.user_pages.atom_feed', user=user.username) %} - - {% trans %}feed icon{% endtrans %} - - {%- trans %}Atom feed{% endtrans -%} + {% include "mediagoblin/utils/feed_link.html" %} {% else %} {# This *should* not occur as the view makes sure we pass in a user. #} diff --git a/mediagoblin/templates/mediagoblin/user_pages/user.html b/mediagoblin/templates/mediagoblin/user_pages/user.html index 02e6fdc2..0214082c 100644 --- a/mediagoblin/templates/mediagoblin/user_pages/user.html +++ b/mediagoblin/templates/mediagoblin/user_pages/user.html @@ -126,11 +126,7 @@ {% set feed_url = request.urlgen( 'mediagoblin.user_pages.atom_feed', user=user.username) %} - - {% trans %}feed icon{% endtrans %} - - {%- trans %}Atom feed{% endtrans -%} + {% include "mediagoblin/utils/feed_link.html" %} {% else %} {% if request.user['_id'] == user['_id'] %} diff --git a/mediagoblin/templates/mediagoblin/utils/feed_link.html b/mediagoblin/templates/mediagoblin/utils/feed_link.html new file mode 100644 index 00000000..c4036bf3 --- /dev/null +++ b/mediagoblin/templates/mediagoblin/utils/feed_link.html @@ -0,0 +1,23 @@ +{# +# GNU MediaGoblin -- federated, autonomous media hosting +# Copyright (C) 2011 Free Software Foundation, Inc +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +#} + + + {% trans %}feed icon{% endtrans %} + +{%- trans %}Atom feed{% endtrans -%} -- 2.25.1