diff options
author | Christopher Allan Webber <cwebber@dustycloud.org> | 2013-01-28 11:58:38 -0600 |
---|---|---|
committer | Christopher Allan Webber <cwebber@dustycloud.org> | 2013-01-30 13:22:18 -0600 |
commit | a3f811a6e8589fc4b47c9f3036ac1cf0c8b0e200 (patch) | |
tree | 48c1c5932b3bfc46a0188f96a7539ee2753e3df4 /mediagoblin/templates | |
parent | 1c2d01ae3ba421536d5775e5992393019714b856 (diff) | |
download | mediagoblin-a3f811a6e8589fc4b47c9f3036ac1cf0c8b0e200.tar.lz mediagoblin-a3f811a6e8589fc4b47c9f3036ac1cf0c8b0e200.tar.xz mediagoblin-a3f811a6e8589fc4b47c9f3036ac1cf0c8b0e200.zip |
Geolocation stuff, including including templates seems to be working-ish
- I'm having trouble seeing if the geolocation stuff actually works,
but plugins are included
- including a list of template hooks works, however the macro to
include them does not, so it's kinda verbose
Diffstat (limited to 'mediagoblin/templates')
3 files changed, 33 insertions, 7 deletions
diff --git a/mediagoblin/templates/mediagoblin/media_displays/image.html b/mediagoblin/templates/mediagoblin/media_displays/image.html index b03cfc78..f27433bd 100644 --- a/mediagoblin/templates/mediagoblin/media_displays/image.html +++ b/mediagoblin/templates/mediagoblin/media_displays/image.html @@ -18,13 +18,19 @@ {% extends 'mediagoblin/user_pages/media.html' %} -{% from "/mediagoblin/utils/templatehooks.html" import template_hook %} +{% from "/mediagoblin/utils/templatehooks.html" import template_hook with context %} {% block mediagoblin_head %} {{ super() }} - {% template_hook "image_extrahead" %} + {% for template in get_hook_templates("image_extrahead") %} + {% include template %} + {% endfor %} + {# {{ template_hook("image_extrahead") }} #} {% endblock mediagoblin_head %} {% block mediagoblin_sidebar %} - {% template_hook "image_sideinfo" %} + {% for template in get_hook_templates("image_sideinfo") %} + {% include template %} + {% endfor %} + {# {{ template_hook("image_sideinfo") }} #} {% endblock %} diff --git a/mediagoblin/templates/mediagoblin/user_pages/media.html b/mediagoblin/templates/mediagoblin/user_pages/media.html index b18e0828..2e159be4 100644 --- a/mediagoblin/templates/mediagoblin/user_pages/media.html +++ b/mediagoblin/templates/mediagoblin/user_pages/media.html @@ -31,7 +31,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 %} @@ -156,8 +156,6 @@ {% include "mediagoblin/utils/license.html" %} - {% include "mediagoblin/utils/geolocation_map.html" %} - {% include "mediagoblin/utils/exif.html" %} {% if media.attachment_files|count %} @@ -199,7 +197,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 new file mode 100644 index 00000000..615ea635 --- /dev/null +++ b/mediagoblin/templates/mediagoblin/utils/templatehooks.html @@ -0,0 +1,22 @@ +{# +# 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 %} |