aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoar Wandborg <git@wandborg.com>2012-01-27 02:13:07 +0100
committerJoar Wandborg <git@wandborg.com>2012-01-27 02:13:07 +0100
commitcd1b836ed4577afc74e3ee7bc480ee329ab68e90 (patch)
tree8ed64b81f253baf8ee82e01709881c00292f2bf9
parent184dbcdacc0404b6fb979995f11732ce0782df04 (diff)
downloadmediagoblin-cd1b836ed4577afc74e3ee7bc480ee329ab68e90.tar.lz
mediagoblin-cd1b836ed4577afc74e3ee7bc480ee329ab68e90.tar.xz
mediagoblin-cd1b836ed4577afc74e3ee7bc480ee329ab68e90.zip
Scripts and styleshets for geolocation map - Conditional
Scripts and stylesheets for the geolocation map are now switched on/off with the geolocation map itself.
-rw-r--r--mediagoblin/templates/mediagoblin/user_pages/media.html16
1 files changed, 10 insertions, 6 deletions
diff --git a/mediagoblin/templates/mediagoblin/user_pages/media.html b/mediagoblin/templates/mediagoblin/user_pages/media.html
index a2ad117e..2229bbb2 100644
--- a/mediagoblin/templates/mediagoblin/user_pages/media.html
+++ b/mediagoblin/templates/mediagoblin/user_pages/media.html
@@ -23,16 +23,20 @@
{% block title %}{{ media.title }} &mdash; {{ super() }}{% endblock %}
{% block mediagoblin_head %}
- <link rel="stylesheet"
- href="{{ request.staticdirect('/extlib/leaflet/leaflet.css') }}" />
<!--[if lte IE 8]><link rel="stylesheet"
href="{{ request.staticdirect('/extlib/leaflet/leaflet.ie.css') }}" /><![endif]-->
<script type="text/javascript"
src="{{ request.staticdirect('/js/comment_show.js') }}"></script>
- <script type="text/javascript"
- src="{{ request.staticdirect('/extlib/leaflet/leaflet.js') }}"></script>
- <script type="text/javascript"
- src="{{ request.staticdirect('/js/geolocation-map.js') }}"></script>
+
+ {% if app_config['geolocation_map_visible'] %}
+ <link rel="stylesheet"
+ href="{{ request.staticdirect('/extlib/leaflet/leaflet.css') }}" />
+
+ <script type="text/javascript"
+ src="{{ request.staticdirect('/extlib/leaflet/leaflet.js') }}"></script>
+ <script type="text/javascript"
+ src="{{ request.staticdirect('/js/geolocation-map.js') }}"></script>
+ {% endif %}
{% endblock mediagoblin_head %}
{% block mediagoblin_content %}