- {% endif %}
- {% if media.media_data.has_key('exif')
- and app_config['exif_visible']
- and media.media_data.exif.has_key('useful') %}
- {#-
- TODO:
- - Render GPS data in a human-readable format
- #}
-
EXIF
-
- {% for key, tag in media.media_data.exif.useful.items() %}
-
-
{{ key }}
-
{{ tag.printable }}
-
- {% endfor %}
-
- {% endif %}
+ {% include "mediagoblin/utils/geolocation_map.html" %}
+
+ {% include "mediagoblin/utils/exif.html" %}
{% endblock %}
diff --git a/mediagoblin/templates/mediagoblin/utils/exif.html b/mediagoblin/templates/mediagoblin/utils/exif.html
new file mode 100644
index 00000000..9962dd65
--- /dev/null
+++ b/mediagoblin/templates/mediagoblin/utils/exif.html
@@ -0,0 +1,33 @@
+{#
+# GNU MediaGoblin -- federated, autonomous media hosting
+# Copyright (C) 2011 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 .
+#}
+
+{% block exif_content %}
+ {% if media.media_data.has_key('exif')
+ and app_config['exif_visible']
+ and media.media_data.exif.has_key('useful') %}
+
EXIF
+
+ {% for key, tag in media.media_data.exif.useful.items() %}
+
+
{{ key }}
+
{{ tag.printable }}
+
+ {% endfor %}
+
+ {% endif %}
+{% endblock %}
diff --git a/mediagoblin/templates/mediagoblin/utils/geolocation_map.html b/mediagoblin/templates/mediagoblin/utils/geolocation_map.html
new file mode 100644
index 00000000..ce1edc39
--- /dev/null
+++ b/mediagoblin/templates/mediagoblin/utils/geolocation_map.html
@@ -0,0 +1,42 @@
+{#
+# GNU MediaGoblin -- federated, autonomous media hosting
+# Copyright (C) 2011 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 .
+#}
+
+{% block geolocation_map %}
+ {% if media.media_data.has_key('gps')
+ and app_config['geolocation_map_visible']
+ and media.media_data.gps %}
+