aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/templates
diff options
context:
space:
mode:
authorChristopher Allan Webber <cwebber@dustycloud.org>2013-01-28 14:08:16 -0600
committerChristopher Allan Webber <cwebber@dustycloud.org>2013-01-30 13:22:19 -0600
commit927be5e8cafbf561ee6ff6a6d74ad566fa3402f0 (patch)
treeeac287842d26067f7fd1f449b993ed67ccb2b15b /mediagoblin/templates
parente9c3384b84fd8735a07a730ef4bcf9f8c2bc350f (diff)
downloadmediagoblin-927be5e8cafbf561ee6ff6a6d74ad566fa3402f0.tar.lz
mediagoblin-927be5e8cafbf561ee6ff6a6d74ad566fa3402f0.tar.xz
mediagoblin-927be5e8cafbf561ee6ff6a6d74ad566fa3402f0.zip
Move template hook over to a template_hook tag. Seems to work! :)
Diffstat (limited to 'mediagoblin/templates')
-rw-r--r--mediagoblin/templates/mediagoblin/media_displays/image.html13
-rw-r--r--mediagoblin/templates/mediagoblin/user_pages/media.html5
-rw-r--r--mediagoblin/templates/mediagoblin/utils/templatehooks.html22
3 files changed, 5 insertions, 35 deletions
diff --git a/mediagoblin/templates/mediagoblin/media_displays/image.html b/mediagoblin/templates/mediagoblin/media_displays/image.html
index f27433bd..bc03c456 100644
--- a/mediagoblin/templates/mediagoblin/media_displays/image.html
+++ b/mediagoblin/templates/mediagoblin/media_displays/image.html
@@ -18,19 +18,12 @@
{% extends 'mediagoblin/user_pages/media.html' %}
-{% from "/mediagoblin/utils/templatehooks.html" import template_hook with context %}
-
{% block mediagoblin_head %}
{{ super() }}
- {% for template in get_hook_templates("image_extrahead") %}
- {% include template %}
- {% endfor %}
- {# {{ template_hook("image_extrahead") }} #}
+ {% template_hook("image_extrahead") %}
{% endblock mediagoblin_head %}
{% block mediagoblin_sidebar %}
- {% for template in get_hook_templates("image_sideinfo") %}
- {% include template %}
- {% endfor %}
- {# {{ template_hook("image_sideinfo") }} #}
+ {{ super() }}
+ {% template_hook("image_sideinfo") %}
{% endblock %}
diff --git a/mediagoblin/templates/mediagoblin/user_pages/media.html b/mediagoblin/templates/mediagoblin/user_pages/media.html
index 2e159be4..1cc2a763 100644
--- a/mediagoblin/templates/mediagoblin/user_pages/media.html
+++ b/mediagoblin/templates/mediagoblin/user_pages/media.html
@@ -18,7 +18,6 @@
{% extends "mediagoblin/base.html" %}
{% import "/mediagoblin/utils/wtforms.html" as wtforms_util %}
-{% from "/mediagoblin/utils/templatehooks.html" import template_hook %}
{% from "mediagoblin/utils/pagination.html" import render_pagination %}
{% block title %}{{ media.title }} &mdash; {{ super() }}{% endblock %}
@@ -31,7 +30,7 @@
<script type="text/javascript"
src="{{ request.staticdirect('/js/keyboard_navigation.js') }}"></script>
- {{ template_hook("media_extrahead") }}
+ {% template_hook("media_extrahead") %}
{% endblock mediagoblin_head %}
{% block mediagoblin_content %}
@@ -197,7 +196,7 @@
</p>
{% endif %}
- {{ template_hook("media_sideinfo") }}
+ {% template_hook("media_sideinfo") %}
{% block mediagoblin_sidebar %}
{% endblock %}
diff --git a/mediagoblin/templates/mediagoblin/utils/templatehooks.html b/mediagoblin/templates/mediagoblin/utils/templatehooks.html
deleted file mode 100644
index 615ea635..00000000
--- a/mediagoblin/templates/mediagoblin/utils/templatehooks.html
+++ /dev/null
@@ -1,22 +0,0 @@
-{#
-# GNU MediaGoblin -- federated, autonomous media hosting
-# Copyright (C) 2011, 2012 MediaGoblin contributors. See AUTHORS.
-#
-# 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/>.
-#}
-{% macro template_hook(hook_name) %}
- {% for template in get_hook_templates(hook_name) %}
- {% include template %}
- {% endfor %}
-{% endmacro %}