Feed link, as an includable template!
This commit is contained in:
parent
0ddea95ea6
commit
5b21ecf9db
@ -39,10 +39,6 @@
|
||||
{% set feed_url = request.urlgen(
|
||||
'mediagoblin.listings.tag_atom_feed',
|
||||
tag=tag_slug) %}
|
||||
<a href="{{ feed_url }}">
|
||||
<img src="{{ request.staticdirect('/images/icon_feed.png') }}"
|
||||
class="media_icon" alt="{% trans %}feed icon{% endtrans %} />
|
||||
</a>
|
||||
<a href="{{ feed_url }}">{%- trans %}Atom feed{% endtrans -%}</a>
|
||||
{% include "mediagoblin/utils/feed_link.html" %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
@ -45,11 +45,7 @@
|
||||
{% set feed_url = request.urlgen(
|
||||
'mediagoblin.user_pages.atom_feed',
|
||||
user=user.username) %}
|
||||
<a href="{{ feed_url }}">
|
||||
<img src="{{ request.staticdirect('/images/icon_feed.png') }}"
|
||||
class="media_icon" alt="{% trans %}feed icon{% endtrans %}" />
|
||||
</a>
|
||||
<a href="{{ feed_url }}">{%- trans %}Atom feed{% endtrans -%}</a>
|
||||
{% include "mediagoblin/utils/feed_link.html" %}
|
||||
</div>
|
||||
{% else %}
|
||||
{# This *should* not occur as the view makes sure we pass in a user. #}
|
||||
|
@ -126,11 +126,7 @@
|
||||
{% set feed_url = request.urlgen(
|
||||
'mediagoblin.user_pages.atom_feed',
|
||||
user=user.username) %}
|
||||
<a href="{{ feed_url }}">
|
||||
<img src="{{ request.staticdirect('/images/icon_feed.png') }}"
|
||||
class="media_icon" alt="{% trans %}feed icon{% endtrans %}" />
|
||||
</a>
|
||||
<a href="{{ feed_url }}">{%- trans %}Atom feed{% endtrans -%}</a>
|
||||
{% include "mediagoblin/utils/feed_link.html" %}
|
||||
</div>
|
||||
{% else %}
|
||||
{% if request.user['_id'] == user['_id'] %}
|
||||
|
23
mediagoblin/templates/mediagoblin/utils/feed_link.html
Normal file
23
mediagoblin/templates/mediagoblin/utils/feed_link.html
Normal file
@ -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 <http://www.gnu.org/licenses/>.
|
||||
#}
|
||||
|
||||
<a href="{{ feed_url }}">
|
||||
<img src="{{ request.staticdirect('/images/icon_feed.png') }}"
|
||||
class="media_icon" alt="{% trans %}feed icon{% endtrans %}" />
|
||||
</a>
|
||||
<a href="{{ feed_url }}">{%- trans %}Atom feed{% endtrans -%}</a>
|
Loading…
x
Reference in New Issue
Block a user